How to know the direction of travel

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Noppa

Member
Oct 15, 2021
3
0
1
How would I get a script that indicates which direction the player is going. So that, for example, if the player goes straight ahead, for example, his yaw is 0 and the direction of travel is also zero. and if the player goes sideways then, for example, yaw 90 and direction of travel 180.
Sorry if I make mistakes, my English is not good.
 
Code:
set {_vector} to velocity of player
set {_x} to x of {_vector}
set {_z} to z of {_vector}
set {_degrees} to (180 * atan2({_x},{_z}))/3.14
 
Status
Not open for further replies.