1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved How to check is player moving forward?

Discussion in 'Development' started by korado531m7, May 17, 2021.

  1. korado531m7

    korado531m7 Slime

    Messages:
    77
    GitHub:
    korado531m7
    I want to check whether player is moving forward without using scheduler.
    thank you in advance.
     
    Primus likes this.
  2. Primus

    Primus Zombie Pigman

    Messages:
    749
    Do you mean the way they're facing?

    Check if the directional vector is pointing approximately the same direction as the movement vector. You can get the movement vector by subtracting your position with the last position and normalize the vector.
     
  3. korado531m7

    korado531m7 Slime

    Messages:
    77
    GitHub:
    korado531m7
    thanks, i did it
     
    Primus likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.