Skip to content
mika edited this page Apr 26, 2018 · 3 revisions

Math

  • float GetDistance(float sx, float sy, float sz, float tx, float ty, float tz)
    • returns distance of 2 points (same as Vector3.Distance() in Unity)
  • float GetDistanceToObject(string source, string target)
    • Vector3 distance between 2 objects
    • returns -1 if no object is founded
  • float GetAngle3D(float sx, float sy, float sz, float tx, float ty, float tz)
    • returns Vector3.Angle() between 2 points
  • float GetAngle2D(float sx, float sy, float tx, float ty)
    • returns Vector2.Angle() between 2 points
  • float[] GetTransformForwardDirection(string id)
    • transform.forward vector3
  • float[] GetTransformUpDirection(string id)
    • transform.up vector3
Clone this wiki locally