Roblox CameraScripts documentation

Hello, I’ve been trying to find documentation on Roblox’s core camera scripts but I can’t quite find anything. Is there an API reference somewhere, or must I try to read through the code itself to figure out how to properly leverage it?

My current use case is to see if there’s an exposed property or method that I can pull from to determine if the player is currently moving the camera, but I’m sure I will have more in the future.

Yes, I understand that I could get the information myself by comparing the last and current positions of the camera in a .Changed event with a busy loop, but it makes more sense to grab this information directly from the CoreScript.

Thanks,

Cody

There is the API Reference Manual , you may be able to find some useful information there.

You might also be able to pick some information out of this topic that may help you.

1 Like

I have checked the devhub, Roblox’s github, and the developer forum for previous queries. That topic does not satisfactorily answer my question.

I know @AllYourBlox worked extensively on the PlayerScripts. Sorry for the ping, but could you potentially point me in the right direction?

Well unfortunately I’m not exactly what you would call an overly experienced programmer, so aside from relaying anything that I find which could be potentially useful, the help I can give is probably rather limited.

If you only want to check if they move the camera you can just check the camera CFrame every so often to see if its changed. for example

local Cam = game.Workspace.CurrentCamera
while true do
    local CF1 = Cam.CFrame
    wait(10)
    local CF2 = Cam.CFrame
    if CF1 == CF2 then
        -- Camera Has Not Moved.
    end
end

As CFrame takes LookVectors rotation and position into acount this should be all you need. If it doesnt account for certain things just add in more checks, its not a high usage script so it would be fine.

Edit:
Getting it from the core script wont make any difference. You still having to do the same thing, just in core script it will be more of a jumble. Personally I wouldnt do it through core script as it just opens up a can of worms that isnt worth the hastle.