Script API - v1.21.90.28

    Class Vector3Utils

    Utilities operating on Vector3 objects. All methods are static and do not modify the input objects.

    Index

    Constructors

    Methods

    • fromString

      Gets a Vector3 from the string representation produced by Vector3Utils.toString. If any numeric value is not a number or the format is invalid, undefined is returned.

      Parameters

      • str: string

        The string to parse

      • Optionaldelimiter: string

        The delimiter used to separate the components. Defaults to the same as the default for Vector3Utils.toString

      Returns Vector3

    • magnitude

      The magnitude of a vector

      Parameters

      Returns number

    • rotateX

      Rotates the vector around the x axis counterclockwise (left hand rule)

      Parameters

      • v: Vector3
      • a: number

        Angle in radians

      Returns Vector3

    • rotateY

      Rotates the vector around the y axis counterclockwise (left hand rule)

      Parameters

      • v: Vector3
      • a: number

        Angle in radians

      Returns Vector3

    • rotateZ

      Rotates the vector around the z axis counterclockwise (left hand rule)

      Parameters

      • v: Vector3
      • a: number

        Angle in radians

      Returns Vector3

    • scale

      Multiple all entries in a vector by a single scalar value producing a new vector

      Parameters

      Returns Vector3

    • toString

      Create a string representation of a vector3

      Parameters

      • v: Vector3
      • Optionaloptions: { decimals?: number; delimiter?: string }

      Returns string

    MMNEPVFCICPMFPCPTTAAATR