Spring camera starts in weird position

I’m trying to make a camera that looks at an object(using springs for some added bounce), the problem is when the spring starts it doesn’t start from the cameras position, it instead starts from some odd angle.

demonstration:

https://gyazo.com/b2cd985d47f8ae3fca0e60a972484055

My camera function:

local function cameraLookAt()
	spring.Speed = workspace.Speed.Value
	spring.Damper = workspace.Damping.Value
	
	spring.Target = car.VehicleSeat.CFrame.Position
	workspace.CurrentCamera.CFrame = CFrame.lookAt(workspace.CurrentCamera.CFrame.Position, spring.p)
end
1 Like

What spring module are you using (e.g. Quenty’s)?

1 Like

I’m using Quenty’s Spring module

1 Like

I’m guessing that’s because the spring starts from Vector.zero (Vector.new(0,0,0)) and slowly interpolates to ‘car.VehicleSeat.CFrame.Position’. Try doing something like this.

local function cameraLookAt()
	local spring = Spring.new(workspace.CurrentCamera.CFrame.Position)
	spring.Speed = workspace.Speed.Value
	spring.Damper = workspace.Damping.Value

	spring.Target = car.VehicleSeat.CFrame.Position
	workspace.CurrentCamera.CFrame = CFrame.lookAt(workspace.CurrentCamera.CFrame.Position, spring.p)
end

This function is bound to render step, I don’t think I’m able to do this.