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

Is there any way I can remove camera restrictions?

I am currently working on a jet, and the jet flies smoothly. However, when the camera points straight up or down (since the jet sometimes flies straight up or down), the jet starts spinning like crazy. After doing some research, I found that it wasn't the jet's CFrame causing the problem but rather the camera's restrictions (since the camera is up 90 degrees). Is there any way I can remove these camera restrictions?

1 answer

Set CameraType to Scriptable and manually update the Camera.CFrame to that of the jet with RunService.

local Camera = workspace.CurrentCamera
Camera.CameraType = Enum.CameraType.Scriptable
game:GetService("RunService").PreRender:Connect(function()
	Camera.CFrame = Jet.CFrame
end)

6 comments

0

The Jet isn't a part, its a model, also won't doing this set the camera to the same position as the jet? I want the player to see the back of the jet.

0

My goal is technically to allow the camera to look in a 360 degree angle up and down, and not just left and right, while the player is in the jet in order to prevent the spinning.

0

I don't know how your game is set up, so I was hoping you'd take the hint and replace Jet with something else. You could easily create an invisible CameraPart near the back of the plane, at constant offset from the plane (by welding or otherwise) and have the Camera.CFrame set to that.\

0

Do note that this prevents the player from panning the camera, you'll actually need to script that in (it's not that hard).

0

Ok so after doing that, it still spins when it looks straight up and straight down.

0

Do you have the video of it spinning? The camera is completely unrestricted in Scriptable mode.

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