Is there any possibility to:
1) Prohibit body to move across one of the main axises (X, Y, or Z)?
2) Prohibit body to have angular velocity?
Is there any possibility to....
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Is there any possibility to....
Yes, you can use the btGeneric6DofConstraint to do this. Just lock 1 axis, and leave 2 linear axis free.Jack wrote:Is there any possibility to:
1) Prohibit body to move across one of the main axises (X, Y, or Z)?
This can be done with the btGeneric6DofConstraint too, just lock the 3 angular axis.Jack wrote: 2) Prohibit body to have angular velocity?
Another solution is to prevent impulses to add angular velocity. This can be handy for a basic character controller.
Use btRigidBody's setAngularFactor and set it to zero.
Hope this helps,
Erwin
-
- Posts: 59
- Joined: Thu Aug 31, 2006 11:51 am
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
You can provide a static rigidbody, with mass 0, and no collision shape. I'm pretty busy otherwise I would give you some samplecode, but there must be some sample/snippet that does this.Jack wrote:btGeneric6DofConstraint requires second body. But what if I have no second body? Second body is World....
Hope this helps,
Erwin