Hi,
I'm having some problem with collision between a box shape and a plane. The plane is static with 0 mass and deactivation is disabled.
In general when I create my bodies they are all Kinematic/NoResponse but then I switch them to Dynamic and turn off NoResponse to begin simulation. When the user wants to drag one of the bodies I switch it back to being Kinematic/NoResponse again for the period of the drag operation.
In my scene I have a groundplane defined and what I see is that when I drop my box shape sometimes it collides and other times it just sails on through. However I have another body that is never switched, (it's always marked as dynamic) and this body never fails to hit the ground plane.
So I was wondering if there are any gotchas that I should know about when dynamically switching a between various collision modes?
By the way I'm actually using BulletX
thanks!
Switching Modes
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Switching Modes
It is probably best to remove the rigidbody from the dynamics world, then make the change, and add it back to the dynamics world.Digini wrote:Hi,
I'm having some problem with collision between a box shape and a plane. The plane is static with 0 mass and deactivation is disabled.
In general when I create my bodies they are all Kinematic/NoResponse but then I switch them to Dynamic and turn off NoResponse to begin simulation. When the user wants to drag one of the bodies I switch it back to being Kinematic/NoResponse again for the period of the drag operation.
In my scene I have a groundplane defined and what I see is that when I drop my box shape sometimes it collides and other times it just sails on through. However I have another body that is never switched, (it's always marked as dynamic) and this body never fails to hit the ground plane.
So I was wondering if there are any gotchas that I should know about when dynamically switching a between various collision modes?
By the way I'm actually using BulletX
thanks!
Hope this helps,
Erwin