How to make a character's weapon always point to the direction of the mouse

  • Tomcat replied to this.
  • xuran How to make a character's weapon always point to the direction of the mouse

    You can probably get help from this:

    One math step at a time. Can you get both a vector to show where the player is and another one to show where the mouse is?
    As a good first step you'll probably want to subtract one from the other and normalize the new vector (make it a length of 1).
    Or just checkout the look_at function =P

    xuran How to make a character's weapon always point to the direction of the mouse

    You can probably get help from this: