I created a dynamic rigidbody as a trigger, and a terrain heightfield. At the first place, the trigger was placed in (0,222,0), then let it drop. It will be stopped when it collide with terrain. But bullet mistake they are on collision
when the trigger enter the AABB of the heightfield. So the trigger was hanged on the sky. I want to know,
how to let bullet callback when the trigger truly touch the surface of the terrain.
dynamic rigidbody trigger with terrain
-
- Posts: 1
- Joined: Tue Dec 12, 2017 4:33 am
dynamic rigidbody trigger with terrain
You do not have the required permissions to view the files attached to this post.
-
- Posts: 849
- Joined: Tue Sep 30, 2014 6:03 pm
- Location: San Francisco
Re: dynamic rigidbody trigger with terrain
Perhaps you could monitor collision events and stop the falling object when it hits something?
Bullet doesn't supply "collision events" per-se, but it does provide a few hooks for figuring out when a collision is happening. You could register a callback to analyze contacts as they are created. Alternatively you could walk all contact manifolds at the end of each step looking for a contact manifold that involves your falling object (I would recommend this method rather than filtering all contacts).
Bullet doesn't supply "collision events" per-se, but it does provide a few hooks for figuring out when a collision is happening. You could register a callback to analyze contacts as they are created. Alternatively you could walk all contact manifolds at the end of each step looking for a contact manifold that involves your falling object (I would recommend this method rather than filtering all contacts).