How do I Set Rotation (Pitch yaw roll)?

Hi All,

Sorry if this is a dumb question but I’m very new to Jmonkey and I need some quick help.

So I’m receiving pitch, yaw, and roll information from a device in degrees. And I have a simple 3d model set around a pivot node.

I want it to simply set the pivot node to go to these values. However when I use node.rotate I think its rotating the the object by those values rather than to those values.

How to I set it to go to those values instead of rotating by them. I know this should be simple but Im having trouble figuring it out.




And in case this trips you up, Quaternion.fromAngles() has the wrong names for the parameters:,%20float,%20float)

It says yaw, roll, pitch but the best approximation would be pitch, yaw, roll.

You will also need to know what order the angles should be applied in… one of the many ambiguities of yaw, pitch, roll. fromAngles() might not be compatible with that in which case you will have to form three separate quaternions and then combine them.