I'm trying to make a dungeon game where the camera of a player can't zoom in or out (I've already done that part) but I need to make it so shift lock is always enabled (I can probably do that on my own as well)...
But I'm trying to make it so the player's camera angle can move left/right but not up/down, kind of like the "Orbital" roblox camera setting, the only problem is I'm trying to make the game a top down shooter, but I can't set the camera angle in the Orbital view.
I'm sure there is a simple way to vertically lock a camera angle, but I can't find it in the playersettings, there is only min/max zoom, what do I do?
For reference, the camera idea I'm going for is similar to this game's camera. https://www.roblox.com/games/9207492417/Rogue-Nightmare
If you want to activate automatically when a Player
joins, you can change StarterPlayer.DevComputerCameraMovementMode
to Orbital
. For mobile devices, you can change StarterPlayer.DevTouchCameraMovementMode
to Orbital
.
If you want to set the player's camera mode to Orbital
when triggered by an event, you can change Player.DevComputerCameraMode
to Orbital
. For mobile devices, you can change Player.DevTouchCameraMode
to Orbital
.
For example, you want to set the player's camera mode to Orbital
when clicking a button.
-- LocalScript inside the button local button = script.Parent local orbital = false local Players = game:GetService("Players") local player = Players.LocalPlayer button.MouseButton1Click:Connect(function() -- when the button is clicked using the left mouse button (common) if orbital then -- if camera mode is in orbital orbital = false player.DevComputerCameraMode = Enum.DevComputerCameraMovementMode.UserChoice -- sets it back to normal (computer devices) player.DevTouchCameraMode = Enum.DevTouchCameraMovementMode.UserChoice -- sets it back to normal (mobile devices) else orbital = true player.DevComputerCameraMode = Enum.DevComputerCameraMovementMode.Orbital -- sets it to Orbital (computer devices) player.DevTouchCameraMode = Enum.DevTouchCameraMovementMode.Orbital -- sets it to Orbital (mobile devices) end end)