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

How do i use the direction of the player's camera?

Asked by
Echtic 128
5 years ago

So i need to detect the LookVector of the player's camera, but i'm not so sure how to do that, any ideas?

1 answer

Log in to vote
0
Answered by
mc3334 649 Moderation Voter
5 years ago

You can access the cameras lookvector VIA the client side by doing this:

local LookV = workspace.CurrentCamera.CFrame.LookVector

Hope my answer helped. If there are further complications im happy to help.

0
I have already tried that, and the result is not as expected. The local script is sending that information to the server one which should then use it to set the new made body velocity's velocity, basically the player should start moving in the direction of the camera. Do you have any ideas of some other ways to achieve that? Echtic 128 — 5y
0
Instead of moving to the direction that the camera points, the player moves to the same direction each time the function is fired. Echtic 128 — 5y
0
Then your issue lies within the code you use. This answer is correct, so please accept it. I am happy to help with your code if you repost it in a seperate question mc3334 649 — 5y
Ad

Answer this question