Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

However, what I want is this:

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


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

Browse other questions tagged or ask your own question.