Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / What are the GetObject3DPhysicsContactXYZ() value relative to?

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 31st Oct 2018 02:14
I must be doing something wrong because the return values for GetObject3DPhysicsContactXYZ() don't seem to relate to my co-ordinate space or the co-ordinate space of the object

How do i use the returned values?

Here's my attempt;

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 31st Oct 2018 21:28


Kinematic bodies can not use a static shape!!!
The coffee is lovely dark and deep,and I have code to write before I sleep.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 31st Oct 2018 21:59 Edited at: 31st Oct 2018 22:00
Ah. Ok. So i want the shape to be the same as the mesh and SetObjectShapeConvexHull(() does not report a collision or is it ok to move static bodies
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 31st Oct 2018 22:39
Quote: "or is it ok to move static bodies"


There are 3 types of rigid physics bodies,
1. Dynamic = moved by the physics engine.
2. Kinematic = moved by you but can interact with dynamic.
3.Static = Does not move period.

The polygon collision shape is static period.
All the other shapes can be any of the 3 listed above.

Quote: "So i want the shape to be the same as the mesh and SetObjectShapeConvexHull(() does not report a collision "


Convex hull shape is as close as you can get to the original mesh and did report collisions when I did the physics.
I did not have time to test your code so it is possible that something changed in AppGameKit since then.
I only glanced at your code and pointed out the first error I saw.
The coffee is lovely dark and deep,and I have code to write before I sleep.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 1st Nov 2018 21:31 Edited at: 2nd Nov 2018 21:49
I must be doing something wrong again here. When I run the app i can aim way outside the shape (red square) and it will still collide.
Using
Create3DPhysicsKinematicBody( p1 )
SetObjectShapeConvexHull( p1 )

GetObject3DPhysicsContactXYZ() Still don't seem to make any sense either

Login to post a reply

Server time is: 2024-11-23 12:52:47
Your offset time is: 2024-11-23 12:52:47