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 6 years ago
Edited 6 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 6 years ago

Assuming you've already defined the Camera value:

local rotation = CFrame.Angles(0,0,0) -- Change to your desired rotation
Camera.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 — 6y
Ad

Answer this question