Cinemachine
![]() | UnityQuaternionExtensionsApplyCameraRotation Method |
Apply rotations, first about world up, then about (travelling) local right.
rot.y is rotation about worldUp, and rot.x is second rotation, about local right.
Namespace: Cinemachine.Utility
Assembly: Cinemachine (in Cinemachine.dll) Version: 2.0.0.0 (2.0.0.0)

public static Quaternion ApplyCameraRotation( this Quaternion orient, Vector2 rot, Vector3 worldUp )
Cinemachine.Utility.UnityQuaternionExtensions.ApplyCameraRotation = function(orient, rot, worldUp);
Parameters
- orient
- Type: Quaternion
[Missing <param name="orient"/> documentation for "M:Cinemachine.Utility.UnityQuaternionExtensions.ApplyCameraRotation(UnityEngine.Quaternion,UnityEngine.Vector2,UnityEngine.Vector3)"]
- rot
- Type: Vector2
Vector2.y is rotation about worldUp, and Vector2.x is second rotation, about local right. - worldUp
- Type: Vector3
Which way is up
Return Value
Type: Quaternion[Missing <returns> documentation for "M:Cinemachine.Utility.UnityQuaternionExtensions.ApplyCameraRotation(UnityEngine.Quaternion,UnityEngine.Vector2,UnityEngine.Vector3)"]
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Quaternion. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).