UxrManager.RotateLocalAvatarCoroutine Method
Public avatar rotation coroutine that can be yielded from an external coroutine. Rotates the avatar around its vertical axis, where a positive angle turns it to the right and a negative angle to the left.
Namespace: UltimateXR.Core
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public IEnumerator RotateLocalAvatarCoroutine(
float degrees,
UxrRotationType rotationType = UxrRotationType.Immediate,
float transitionSeconds = 0.1f,
Action rotatedCallback = null,
Action finishedCallback = null,
bool propagateEvents = true
)
Parameters
- degrees
- Type: System.Single
The degrees to rotate - rotationType (Optional)
- Type: UltimateXR.Locomotion.UxrRotationType
The type of rotation to use. By default it will rotate immediately - transitionSeconds (Optional)
- Type: System.Single
If rotationType has a duration, it will specify how long the rotation transition will take in seconds. By default it is TeleportRotationSeconds - rotatedCallback (Optional)
- Type: System.Action
Optional callback executed depending on the rotation mode:- Immediate: Right after finishing the rotation.
- Fade: When the screen is completely faded out and the avatar has rotated, before fading back in. This can be used to enable/disable/change GameObjects in the scene since the screen at this point is fully rendered using the fade color.
- Smooth: Right after finishing the rotation.
- finishedCallback (Optional)
- Type: System.Action
Optional callback executed right after the rotation finished. If a fade effect has been requested, the callback is executed right after the screen has faded back in. - propagateEvents (Optional)
- Type: System.Boolean
Whether to propagate AvatarMoving/AvatarMoved events
Return Value
Type: IEnumerator
Coroutine enumerator
Remarks
If Fade translation mode was specified, the default black fade color can be changed using TeleportFadeColor.