Converting CFrame components to CFrame angles

Simple way to get the rotation matrix which you can multiply by a CFrame to apply rotation on:

local rotationMatrix = cf - cf.Position

You can just multiply it by the CFrame you use just like you would with CFrame.Angles. The rotation matrix would return a CFrame exactly the same as the original CFrame but position coordinates being 0, 0, 0, thus keeping the rotational components and emptying the position coordinates.


EDIT: I made this reply before I saw a similar reply in the thread of the reply above me.

1 Like