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

How would I make a character walk in the direction the camera is facing?

Asked by 8 years ago

I know it requires a loop of :MoveTo(), but how could I use the direction of a camera to move the user forward?

1 answer

Log in to vote
1
Answered by 8 years ago

The Camera is an interesting Object, featuring many functions for problems like these. More specifically, what could help you is Camera.Focus, I believe. Represents the point the camera is looking at. Now, essentially you just have to use MoveTo as you stated to move to the Vector3 of Focus (which is a CFrame!)

There is an alternate method with Rays, and a few other alternate methods which work best in First Person View, but I assumed you use any view.

Ad

Answer this question