Constraint questions

SaTANO
Posts: 3
Joined: Wed Aug 17, 2011 10:28 am

Constraint questions

Post by SaTANO »

First question is just YES/NO

I want to manipulate object using constraint with specific maximal force.
I checked btGeneric6DofConstraint Class Reference http://www.bulletphysics.com/Bullet/Bul ... raint.html but there is written
At this moment translational motors are not supported. May be in the future.
So I end up building my own translational motor. After some time I've successfully made it but it was mass depend (I used mass, max force and target velocity for acceleration and force calculations).

Later I checked bullet sources and find out that motor should work so I tried to enable motor, set max force, free axis and set desired velocity for constraint and guess what, It works. So I am confused.

Another question is about velocity
I want to move rigid body from altitude 5 to altitude 10 so I set up target_velocity 10-5 = 5
When I set positive velocity on Y translational motor of constraint (frameInB is identity) object is in moving negative Y direction (X and Z works OK)
Mako_energy02
Posts: 171
Joined: Sun Jan 17, 2010 4:47 am

Re: Constraint questions

Post by Mako_energy02 »

The documentation in bullet is old and aweful, and not maintained. For the most part, consider the doxygen API just a hint to what's really going on and use the Forums more, as they'll lead to more accurate information. But yes, the translational motor of the 6Dof constraint is working and has been for some time.

Regarding the second question, it's hard to say without looking at your code.
SaTANO
Posts: 3
Joined: Wed Aug 17, 2011 10:28 am

Re: Constraint questions

Post by SaTANO »

Thanks for fast answer

Second question:
Negative motor velocity was caused by memory bug of my own quaternion class.