Simple Question about Roblox Rotations

Does roblox store rotations as a quaternion or as a rotation matrix? If not, why does roblox not use quaternions like unity? I do see they have ways to put the rotation matrix into a quaternion but why don’t they just overall support it?

2 Likes

CFrames are a 4x4 matrix (with the rotation matrix being 3x3) which is the same as how unity does it.

If you’re asking why there’s no native support for quaternions it’s because they bring a lot of challenges. Quaternions are not intuitive to understand or use, and performing operations like “rotate 90 degrees about the Y axis” isn’t straightforward. Especially for beginner game devs with little experience with 3D math. (Also very little use cases for quaternions, I’ve personally never had to use them in the 3 years I’ve been programming on roblox).

And if you ever do run into a situation where you need to use a quaternion, you can always convert the euler angles into a quaternion.

3 Likes

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