Scripting

Search The Documentation:

  1. Home
  2. Docs
  3. Scripting
  4. Math
  5. dirToAngle

dirToAngle

Platform Compatibility

PC Mac OSX Oculus Quest
X X X

Decide the fastest way to reach an angle, 0 for angles matching, 1 for clockwise, -1 for counter clockwise

Parameters:

  • currentAngle
    • A float value
  • targetAngle
    • A float value

returns a Float (decimal number) value

Example:

1
obj.dirToAngle(currentAngle, targetAngle)
Tags
Was this article helpful to you? Yes No

How can we help?