I'm developing a game using Bullet and I got somewhat stuck with constraints.
I have an object that I want to spin around an axis for which I've set a hinge constraint like the following:
Code: Select all
btHingeConstraint* hinge;
btVector3 btPivotA(0.0f, 0.0f, 0.0f);
btVector3 btAxisA(0.0f, 0.0f, 1.0f);
hinge = new btHingeConstraint(*body, btPivotA, btAxisA);
hinge->setLimit(lowerLimit, upperLimit);
dynamicsWorld->addConstraint(hinge);Code: Select all
body->applyTorqueImpulse(btVector3(0, 0, -100));Thanks in advance