Addon ID

  • masterpose_vector

Info

Statistics

  • Download count8 total downloads
  • Latest download count 8 downloads of latest version
  • Average download count1 downloads per day average

Owners

Description

A single point in space, implementing all common Vector 2D calculations

Example Files

Discussion

  • 3 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • Can this be used to see how much a rotating sprite is facing a position?

    • You can do that by just using the angle() system expression

      • I did not clarify what I meant. My mistake.

        Angle() returns the angle between two points and does not factor in their facing angles. What I needed is to know how much object A is looking at point b. regardless of point B's facing or their angle to each other.

        I was able to get what I needed though.

        -> System: Set facingX to cos(myAngle)

        -> System: Set facingY to sin(myAngle)

        -> System: Set toTargetX to (inputTargetX - myX) ÷ distance(myX, myY, inputTargetX, inputTargetY)

        -> System: Set toTargetY to (inputTargetY - myY) ÷ distance(myX, myY, inputTargetX, inputTargetY)

        -> System: Set dot to (FacingX × ToTargetX) + (FacingY × ToTargetY)