Cinemachine
UnityVectorExtensionsSignedAngle Method |
Get a signed angle between two vectors
Namespace: Cinemachine.Utility
Assembly: Cinemachine (in Cinemachine.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
public static float SignedAngle( Vector3 from, Vector3 to, Vector3 refNormal )
Cinemachine.Utility.UnityVectorExtensions.SignedAngle = function(from, to, refNormal);
Parameters
- from
- Type: Vector3
Start direction - to
- Type: Vector3
End direction - refNormal
- Type: Vector3
This is needed in order to determine the sign. For example, if from an to lie on the XZ plane, then this would be the Y unit vector, or indeed any vector which, when dotted with Y unit vector, would give a positive result.
Return Value
Type: SingleThe signed angle between the vectors
See Also