Page 1 of 1

rotational motor on 6dofgenericSpring does not work

Posted: Thu Jan 31, 2013 4:32 pm
by babak6
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.