Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I get the rotation of the player's camera?

I don't have a script to put down as I'm looking for a straight-forward answer/explanation. I do not need for you to give me a script, more so point me in the right direction.

2 comments

0

what is this for?

0

I made a radar, but I want the radar to rotate with the players' camera's orientation.

1 answer

you can find the CFrame of the Camera simply by doing

workspace.CurrentCamera.CFrame

From this point on you can do a lot of things, like get the LookVector of the camera, or if like in the question, you want the rotation of it, you can use toAxisAngle

local CameraRotation = workspace.CurrentCamera.CFrame:toAxisAngle()

EDIT: Although obvious to some, it should be noted that this script will only work from the Client.

This discussion is preserved as it was. New answers, comments, and votes are closed.