Quaternion rotation nodes have inconsistent application of Euler angles


Both ‘Rotation’ [3D.Quaternion] and ‘Rotation (Vector3)’ [3D.Quaternion] claim to process euler angles by yaw x pitch x roll (check the tooltip).

However they give different results. Seems like one of them is wrong.

QtoEulerCheck.vl (27.5 KB)


the nodes apply the transformations differently, as can be seen in the code:

public static void RotationVector(Vector3 pitchYawRoll, out Quaternion result)
    Stride.Core.Mathematics.Quaternion.RotationYawPitchRoll(pitchYawRoll.X * Float32Extensions.cyclesToRadians,
        pitchYawRoll.Y * Float32Extensions.cyclesToRadians,
        pitchYawRoll.Z * Float32Extensions.cyclesToRadians, out result);

this is probably wrong, as the Vector3 pitchYawRoll is input in the function called RotationYawPitchRoll in the wrong order (x,y,z instead of y,x,z)

1 Like

i created an issue on github


Thanks for the report. Will be fixed in upcoming preview (>= 5.3-167).

1 Like