rotational motor on 6dofgenericSpring does not work

Post Reply
babak6
Posts: 2
Joined: Thu Jan 31, 2013 4:16 pm

rotational motor on 6dofgenericSpring does not work

Post by babak6 » Thu Jan 31, 2013 4:32 pm

i set one generic 6 dof constraint in blender, and exported it to bullet, then i set rotation motor for X axis.see the below code
btGeneric6DofSpringConstraint* c=(btGeneric6DofSpringConstraint*)m_dynamicsWorld->getConstraint(0);
c->enableSpring(3, true);
c->getRotationalLimitMotor(0)->m_enableMotor=true;
c->getRotationalLimitMotor(0)->m_maxMotorForce=100;
c->getRotationalLimitMotor(0)->m_targetVelocity=100;

but it does not work, i debug this and see that m_targetvelocity = 0
there is no function to use this variable.

Post Reply