I’ve found this sorta thing in a few games such as Pressure (with it’s death documents and lockers) and DOORS (with its closets), where your camera is locked in one place, but you can still look around limitedly. How can I replicate this effect?
i remember seeing a post about this (i’ll link it if i find it)
local Camera = workspace.CurrentCamera
local CameraPart = workspace:WaitForChild("CameraPart")
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
repeat wait(); Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
MaxTilt = 15
game:GetService("RunService").RenderStepped:Connect(function()
Camera.CFrame = CameraPart.CFrame * CFrame.Angles(
math.rad((((Mouse.Y - Mouse.ViewSizeY / 2) / Mouse.ViewSizeY)) * -MaxTilt),
math.rad((((Mouse.X - Mouse.ViewSizeX / 2) / Mouse.ViewSizeX)) * -MaxTilt),
0
)
end)
1 Like
Thanks! I didn’t know how to phrase the topic so I couldn’t find much lol.
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.