Hello,
I am working on a PSMove plugin. I can’t get the rotation to work correctly. The PSMove API returns a quaternion. As far as I can tell, the data fed to the Madgwick algorithm that generates the quaternion uses a left-handed coordinate system. (In case you’re wondering, I think +X is through the select->start buttons, +y is from the USB plug to the sphere, and +z is from the PSMove button to the trigger button.)
UE4 also uses a left handed coordinate system. As long as I give my model the correct default 0,0,0 pose (if above axes are correct, this would be buttons facing down, sphere to the right) then everything should just work. But it doesn’t. Rotation around the controller’s X axis works fine, but rotation around its other axes cause the model to rotate in the opposite direction to what I expect.
One thing I noticed while trying to debug this, if I take any object in UE4 (e.g. playerStart in blank template project), increasing X or Y rotation will cause the object to rotate around that axis in a right-screw manner (i.e., looking down the axis +ve direction, it turns clockwise) as expected. However, increasing rotation around the Z axis causes the object to rotate in the opposite direction to what was expected.
So does UE4 use a RH system for orientation, with +z going in the opposite direction?
Or what am I missing?
Thank you.