Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you rotate camera in global axis?

Asked by 7 years ago
Edited 7 years ago

If you're an experience CFrame scripter, you should know what local and global space is. So I want my camera to rotate in global axis, so how do I do it?

If I use CFrame.Angles() or CFrame.fromEulerAnglesXYZ(), it will just rotates in local space

1 answer

Log in to vote
1
Answered by 7 years ago

Assuming you've already defined the Camera value:

1local rotation = CFrame.Angles(0,0,0) -- Change to your desired rotation
2Camera.CFrame = rotation*(Camera.CFrame - Camera.CFrame.p) + Camera.CFrame.p
0
Seems good to me, although I haven't tried it yet, I already found another way of doing this. So thanks anyways Konethorix 197 — 7y
Ad

Answer this question