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

Smoothly move character to camera's point of view?

Asked by 4 years ago

https://www.youtube.com/watch?v=S2FMOm_v43M

As you can see, in the video the character moves to where the camera is looking. And it moves really smoothly. I'm wondering about how I would do something like that?

1 answer

Log in to vote
0
Answered by
Arkrei 389 Moderation Voter
4 years ago

This is done with some camera manipulation

If you want the simple route then you could do

userInputService.MouseBehavior = Enum.MouseBehavior.LockCenter

Then using some CFrame math you could renderstepped the HumanoidRootPart's

by doing something like this:

rootPart.CFrame = CFrame.new(rootPart.CFrame.p,rootPart.CFrame.p + Vector3.new(Mouse.hit.lookVector.x,0,Mouse.hit.lookVector.z))
Ad

Answer this question