I create robot arm using dynamic actors and mainly PxRevoluteJoint. Now I’d like to control every single joint through set angle. Here’s my sample code:
PxRevoluteJoint *j; // my joint
// if angle is less than current degree
while(degrees >= angle)
actor0->getGlobalPose().q.toRadiansAndUnitAxis(angleq,axisq); // ACTOR2 on picture instance->onRenderCallback(); // render and simulate() degrees = angleq * 180/PI; }
setAllKinematicJoints(pPhx->joints, true); // set up all joints to kinematic because I dont’t wont to // move them
My problem is that sometimes everythings works fine but often the ‘degrees’ variable is 180 and axisq changes. I want to rotate my actor0 (actor2 on picture) only in X axis and get always current angle. How I can do that?