Vector3Ext.GetRotationAround Method (Vector3, Vector3, Single)

Computes the rotation of a direction around an axis.

Namespace: UltimateXR.Extensions.Unity.Math
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static Vector3 GetRotationAround(
	this Vector3 direction,
	Vector3 axis,
	float degrees
)

Parameters

 

direction
Type: Vector3
Direction to rotate
axis
Type: Vector3
The rotation axis to use for the rotation
degrees
Type: System.Single
Rotation angle

Return Value

Type: Vector3
Rotated direction

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector3. 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).

See Also

Reference

Vector3Ext Class
GetRotationAround Overload
UltimateXR.Extensions.Unity.Math Namespace