1
\$\begingroup\$

I'm using a right-handed coordinate system with (0,0,-1) = forward, (1,0,0) = right and (0,1,0) = up. PhysX version is 3.3.0.

I have a unit vector which represents the axis around which my actor is supposed to be able to rotate, (0,1,0).

The problem is, if I build a quaternion rotation from that vector, like so:

physx::PxQuat q = (0, physx::PxVec3(0, 1, 0));

and use that for the joint, the actor will actually rotate around the direction of the rotation around the axis:

http://youtu.be/pXMlRRBVOpc

However, what I want is this:

http://youtu.be/MlBx-hC1Z9Q

In the second case I used (0,0,1) as axis and 90 degree as rotation and used that to build the quaternion.

So, how can I use my axis (0,1,0) and actually get the rotation as shown in the second video?

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.