Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Rotate camera to Mouse Position?

Asked by 10 days ago
Edited 10 days ago

Hello, I'm having trouble with a simple script. I'm trying to achieve a third-person over the shoulder view, and I want the camera to pan/move/rotate relatively to the mouse position.

The problem is that the camera is rotating too fast and I'm not sure how to slow down the camera from spinning. How do you fix that?

RunService.RenderStepped:Connect(function()
    camera.CFrame = CFrame.new(camera.CFrame.Position, mouse.Hit.p)
end)

Answer this question