Smart people, how to rotate cframe?

It turns out that I’m apparently a complete idiot.

I want a cframe rotated around x and y axis. Simple as that.
I got ROT_X and ROT_Y values, now I want it to rotate around the Y axis given ROT_Y and rotate around its own axis ROT_X radians.

This is apparently a nightmare to script and I never succede with it.
I’v tried CFrame.Angles(ROT_X, ROT_Y,0) and all other combinations, anyone have any idea how to do it?

P.S Solving it without using the ROT_X and ROT_Y values is NOT a solution.

If I have understood what you’re asking correctly then

CFrame.Angles(0, ROT_Y, 0) * CFrame.Angles(ROT_X, 0, 0)

Tried that. But after this I went back to try again and it seems like:
CFrame.Angles(0,ROT_X,0) * CFrame.Angles(0,0,ROT_Y)
was what I was looking for.

I was working on this for hours yesterday, it’s ironic how you only find solutions directly after posting a thread…

1 Like