playMaker

Author Topic: Vector2SnapToAngle script broken  (Read 512 times)

rezendes

  • Playmaker Newbie
  • *
  • Posts: 1
Vector2SnapToAngle script broken
« on: May 14, 2023, 02:14:33 PM »
I found a couple mistakes in the "Vector2SnapToAngle" script, the line

"var currentAngle = Mathf.Atan2(v2.y, v2.y);"

should instead be:

"var currentAngle = Mathf.Rad2Deg * Mathf.Atan2(v2.y, v2.x);"