Immerseum.VRSimulator Namespace > EventManager Class : OnYawRotationEnd Event |
If default InputActions are enabled, then this event fires whenever the user's avatar has completed its rotation along the Yaw Axis. This event is invoked via the EventManager.endYawRotation method, which is itself called at the conclusion of the primary OnYawRotationStart listener.
Best Practice | |
If you have many separate listeners all listening for a particular OnYawRotationStart, it may be easy to lose track of which listener should invoke EventManager.endYawRotation. As a general rule of thumb, this event should be invoked by the "main" method that deals with the yaw axis movement. "Main" in your case may be the method that does the most, or the method that takes the longest, or the method that deals directly with the user's avatar. Assuming default Input Actions are enabled, then the endYawRotation method will be called and the OnYawRotationEnd event fired when the camera rotation initiated by OnYawRotationStart has finished. |
public event EventManager.YawRotationEndAction OnYawRotationEnd
public class myClass : MonoBehaviour { void OnEnable() { EventManager.OnYawRotationEnd += myCustomListener; } void OnDisable() { EventManager.OnYawRotationEnd -= myCustomListener; } void myCustomListener(InputAction action) { // Custom listener logic goes here. } }