# Rotator is Pitch Yaw Roll, details panel is Roll Pitch Yaw

Hello,

I’m looking to understand why the details panel lists co-ordinates in terms of X=roll, Y=Pitch, Z=Yaw

But in the rotator

``````FRotator OpenDoor (0.f, 90.f, 0.f);
``````

The order of the variables in the parenthesis are (Y=Pitch, Z=Yaw, X=Roll).

Is there a “primary” way I should be thinking of co-ordinates in Unreal, or is there some resource you can link to that will explain this and help me to understand why both are not in the order X,Y,Z?

Thanks.

Blame Sweeney?

After spending a morning drawing on my hands I could maybe rephrase the question.

“X = forward” is good, I like that bit. I’m satisfied that rotating on that axis is going to roll my object.

Using the left hand, Z-up co-ordinate system, it’s reasonable to look at Y next and I can see that rotating around Y will cause my object to pitch.

That leaves Z, and again, I get obvious Yaw when I rotate around Z.

The bit I don’t get is why the person who wrote the FRotator type decided to scramble that order and process the pitch and yaw first and then do the roll last. The one thing at the back of my mind is that I would usually list rotations in the order of Pitch, Yaw, Roll, so at least that feels familiar. Is there some broader convention of performing rotations in the order Pitch, Yaw, Roll that has lead to this apparent scrambling of things in FRotator?

There’s a good chance Tim wrote the FRotator class and didn’t put a whole lot of thought into that decision. Now it’s too late and changing it now would break lots of code everywhere including the engine itself.

Not that I can recall.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.