It seems that HingeConstraint (and other constraints involving an angle limit) doesn't like at all limits that are near or above PI (i.e. 180 degrees).
I tested this in ConstraintDemo.cpp. This works:
Code: Select all
spDoorHinge->setLimit( 0.0f, M_PI_2 );
Code: Select all
spDoorHinge->setLimit( -M_PI, -M_PI_2 );
Code: Select all
spDoorHinge->setLimit( M_PI_2, M_PI );
Code: Select all
btVector3 btAxisA( 0.0f, -1.0f, 0.0f )
Is there a way to define the angular limits relative to the referential of the object, instead of having them be absolute/"relative to the world"? I'd like to be able to place a door (or pinball paddle, in my case) in any position without having to recalculate the limits every time.
Thanks!
Edit: I'm using Bullet 2.74