Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Making a camera tween smoothly?

Asked by 5 years ago

Howdy!

Recently I've been experimenting with a custom camera for a shooter game. The point of it is that the camera will be close to the humanoid, while also being slightly to the right of the player (over the shoulder in a sense).

Issue: The camera seems to "bounce" when used in R15. I've been using the CFrame of the HumanoidRootPart, which people claim doesn't bounce. Get what, it does (least with my luck).

My code is as follows:

rbxAnimator.Tween(camera, "CFrame", player.Character.HumanoidRootPart.CFrame * CFrame.new(7, 3, 2), "Linear", .01)

rbxAnimator isn't important. Its a special tween service I use. However, the part that I've been playing with is player.Character.HumanoidRootPart.CFrame * CFrame.new(7, 3, 2).

It bounces. Is there any way to customly offset the roblox camera, while also keeping movement smooth. I've tried a variety of things, like getting the camera off the part the player touches on the ground and going up to keep it consistent.

0
I am bad at scripting but is this good local runservice = game:GetService("RunService") local player = game.Players.LocalPlayer local h = player.Character:WaitForChild("HumanoidRootPart") local camera = workspace.CurrentCamera runservice.RenderStepped:Connect(function() camera.CFrame = camera.CFrame:Lerp(h.CFrame * CFrame.new(70, 3, 2), .05) end) SuperRetroGaming2 0 — 5y
0
Its good. Similar to the methods I've tried, but hasn't worked. Conmmander 479 — 5y

Answer this question