How would I lock the camera in place?

So in my game I have this system in place where when you hold “C” you bring up a spell wheel, in which there you can select a spell via moving a small dot cursor on it. The way I made it was so that you could move the dot whilst in Shift Lock since this game was made with shift lock in mind, and I was wondering how I could keep the camera facing a singular direction, but also follow the player. I haven’t many ideas and I would like any help.
GIF example of it in-game.

2 Likes

couldn’t you just set the camera to scriptable

1 Like

That would stop the camera from following them as well

then set the camera subject to the hrp?? there are many ways to do this

I think you can try to manage that GUI by enabling Modal on it:
https://developer.roblox.com/en-us/api-reference/property/GuiButton/Modal

Allow the mouse freedom, let it be invisible and the pointer of the spell wheel interpolate between the mouse and the boundary of the wheel.

1 Like

That’s literally the same as the default camera, that does not help this at all.

Aside from making a custom camera, what Oppy said what would likely work best in this case; using the Modal property

it’s literally not the default camera

This is incorrect, scriptable locks the camera in place, you can just set the camera subject to the HumanoidRootPart.

1 Like

What do you mean?


image

1 Like

In the future, confirm what you say is true before you correct someone.
If the video is too compressed, this is the code used:

workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable 
workspace.CurrentCamera.CameraSubject = workspace.Gojinhan.PrimaryPart

Reiterating on what I said earlier, while this does stop the mouse from controlling the camera temporarily, it also means any movement by the player will not be tracked by the camera, flinging, walking, etc. This is a major gameplay inconsistency.

The solution suggested by @Oppy is correct, enabling the .Modal property of any gui object visible in that sequence will cause the behavior the poster desires.

Uh no, you can set CameraMinZoomDistance and CameraMaxZoomDistance via a script, this will stop the player from scrolling in.