Ability to keep camera in a single place during 360

Is there any way to keep the camera still during a motion like this?

Current camera script:

local RunService = game:GetService("RunService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Part = Player.Character:WaitForChild("HumanoidRootPart")
local Camera = workspace.CurrentCamera
local DIST_FROM_PLAYER = 19 -- decrease this to make the camera close and increase for vice versa
local HEIGHT = 5.5--increase or decrease to change the height from the ground
Camera.CameraType = Enum.CameraType.Scriptable
repeat RunService.Stepped:Wait() until Player.Character.Torso
RunService.RenderStepped:Connect(function()
   Camera.CFrame = CFrame.new(Character.Torso.CFrame.Position+(-Character.Torso.CFrame.LookVector*DIST_FROM_PLAYER),Part.Position)*CFrame.new(0,HEIGHT,0)
end)

Your video embed isn’t loading the video. If you want to keep the camera still, you can do

Camera.CameraType = Enum.CameraType.Fixed

Appreciate the fast response however I have tried that, here’s a link to the video: 360

try making a part where you want the camera to be and Weld it to the car and set the parts properties CanCollide off and Massless True then set the camera cframe to the part that way its always above the car EVEN if its upside down

Zero out the x and z rotation, so you only have the y rotation.

RunService.RenderStepped:Connect(function()
   local cf = CFrame.new(Character.Torso.CFrame.Position+(-Character.Torso.CFrame.LookVector*DIST_FROM_PLAYER),Part.Position)*CFrame.new(0,HEIGHT,0)
   local _, y = cf:ToOrientation()
   Camera.CFrame = CFrame.Angles(0, y, 0) + cf.Position
end)

Appreciate that, however it still seems to flip once the car goes inverted, here’s a clip: cam2

I have tried that, it still flips as far as I’m aware

oh, im pretty sure thats because the part rotates with it. try limiting the parts rotation angles that way you still have the effect but it doesnt go upside-down. or just make the part not rotate at all

Make the part of the car the camera is on not go upside down? Kind of confused what you mean

try doing exactly this, and show me a video of it rq

Here ya go: carvid

dude in the RenderStepped function just set the camera cframe to the part like this:
cam.CFrame = part.CFrame
im pretty sure it didnt work due to your `

The camera to me doesn’t seem to flip upside, instead it just ends up behind the track. I think the problem here is that you don’t want it behind the track. You can instead make the camera have an offset from the torso by a certain amount.

RunService.RenderStepped:Connect(function()
   Camera.CFrame = Character.CFrame.Torso.CFrame * CFrame.new(0, 5, 0)
end)
3 Likes

thank you! that works perfectly

1 Like