Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.