So far, so good, but now we need to implement a function to detect if a kinematic object is currently touching any other static object (contact points) in order to spawn the object correctly. I've seen btKinematicCharacterController and the recoverFromPenetration code, so I've tried to implement the ghost object, but it didn't work as expected unless I call performDiscreteCollisionDetection before for every frame, which is expensive and I think unnecessary in this case since we only have to check contact points for an *specific* kinematic object, not the whole world.
What is the best way of doing this for an specific object?
Code: Select all
getContactPointsFrom ( btCollisionObject )
The specified object could be ANY of the kinematic objects previously added to the world (different shapes).
We need to check if we can spawn an object in a specific location in the world.
Thanks in advance.