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

How can I eliminate the mouse moving the camera in first person?

Asked by
RoboFrog 400 Moderation Voter
9 years ago

I would like make it to where moving the mouse in first person will NOT effect the camera. This is for cutscenes, so I would also like to give user control of mouse based camera movement afterwards. I've already got everything else coded for the cutscenes, and this has been rather annoying since it will occasionally mess up timed camera movements.

I'll be using local scripts, so I can access the player's mouse and camera easily. One way I assume it'll work is by cloning the local player's mouse to storage, deleting it, and cloning it back once the cutscene is over. However, I'm not sure if camera and mouse are linked during cutscenes, or if the camera can still be moved regardless of a missing mouse.

However, I know this is most definitely inefficient if it'll function at all, therefore I'd definitely like to learn the "correct" way first.

Thank you for reading!

EDIT: I need lines such as --

to still function correctly, since that's what my cutscenes are largely based upon. (I'll assume this can be fixed by also specifying the frame and all of that, but the sheer amount of editing would take more time than this minor annoyance is annoying. If there's a workaround something like what I said above, I'd love to know)

However, if the other answer is the only way, I'll definitely keep that in mind for future projects, or if I'm willing to take a day modifying everything.

1 answer

Log in to vote
Answered by 9 years ago

For every frame of the cutscene, make the camera's CameraType equal to Enum.CameraType.Scriptable.

When the cutscene is over, set the CameraType back to Enum.CameraType.Custom and set the CameraSubject to the Humanoid.

I appreciate your answer, but sadly, it breaks a lot of my lines and I'm unable to use it. RoboFrog 400 — 9y

Answer this question