Skip to content

format

typescript
Vector3.Angle(from, to)

class: Vector3

description

Calculate the angle between two vectors.

parameter

param_nametypedescription
fromVector3The starting vector.
toVector3The ending vector.

return

typedescription
numberThe angle (in degrees) between the two vectors.

code example

typescript
let from = new Vector3(1,2,3);
let to = new Vector3(3,4,5);
Debug.Log("Angle is",Vector3.Angle(from,to));