API reference
API reference
Select your platform
No SDKs available
No versions available

LocomotionEvent Struct

Conceptually comparable to a PointerEvent, LocomotionEvents encapsulate information about locomotion interactions, indicating a player's intent to teleport, rotate, etc.
These events are emitted by ILocomotionEventBroadcasters and processed by ILocomotionEventHandlers; for canonical examples, see TeleportInteractor and PlayerLocomotor, respectively.

Constructors

LocomotionEvent ( identifier , pose , translationType , rotationType )
Constructor for combined translation-rotation locomotion events, such as teleportation with a turn.
Signature
Oculus.Interaction.Locomotion.LocomotionEvent.LocomotionEvent(int identifier, Pose pose, TranslationType translationType, RotationType rotationType)
Parameters
identifier: int  Numerical identifier of the emitting interactor (see IInteractorView.Identifier for details)
pose: Pose  The pose the user is intending to locomote toward
translationType: TranslationType  The manner in which the translation portion of the locomotion should be interpreted
rotationType: RotationType  The manner in which the rotation portion of the locomotion should be interpreted
LocomotionEvent ( identifier , position , translationType )
Constructor for pure translation locomotion events, such as teleportation.
The Rotation of the constructed event will be RotationType.None.
Signature
Oculus.Interaction.Locomotion.LocomotionEvent.LocomotionEvent(int identifier, Vector3 position, TranslationType translationType)
Parameters
identifier: int  Numerical identifier of the emitting interactor (see IInteractorView.Identifier for details)
position: Vector3  The position the user is intending to locomote toward
translationType: TranslationType  The manner in which the requested locomotion should be interpreted
LocomotionEvent ( identifier , rotation , rotationType )
Constructor for pure rotation locomotion events, such as snap turning.
The Translation of the constructed event will be TranslationType.None.
Signature
Oculus.Interaction.Locomotion.LocomotionEvent.LocomotionEvent(int identifier, Quaternion rotation, RotationType rotationType)
Parameters
identifier: int  Numerical identifier of the emitting interactor (see IInteractorView.Identifier for details)
rotation: Quaternion  The rotation the user is intending to locomote toward
rotationType: RotationType  The manner in which the requested rotation should be interpreted

Properties

EventId : ulong
[Get]
A unique value associated with this specific event, meaning the semantic occurrence at a specific point in time which motivated the creation of this data object.
Signature
ulong Oculus.Interaction.Locomotion.LocomotionEvent.EventId
Identifier : int
[Get]
The numerical identifier of the emitting interactor, comparable to PointerEvent.Identifier; for more information, see the documentation for IInteractorView.Identifier.
Signature
int Oculus.Interaction.Locomotion.LocomotionEvent.Identifier
Pose : Pose
[Get]
The target pose represented by this locomotion event.
Depending on Translation and Rotation, not all of this pose may be applicable for a given event; for example, a LocomotionEvent with a Translation of TranslationType.None only represents a target rotation.
Signature
Pose Oculus.Interaction.Locomotion.LocomotionEvent.Pose
Rotation : RotationType
[Get]
The manner in which the rotation component of the target Pose should be interpreted.
For details, see RotationType.
Signature
RotationType Oculus.Interaction.Locomotion.LocomotionEvent.Rotation
Translation : TranslationType
[Get]
The manner in which the translation component of the target Pose should be interpreted.
For details, see TranslationType.
Signature
TranslationType Oculus.Interaction.Locomotion.LocomotionEvent.Translation

Inner Enums

TranslationType Enum

The manner in which the translational part of a LocomotionEvent.Pose should be interpreted.
For example, if the LocomotionEvent.Rotation property of an event is TranslationType.Absolute, the position expressed in the pose should be understood as world space coordinates to which the player is trying to locomote.

Enumeration Constants

Member
None
Velocity
Absolute
AbsoluteEyeLevel
Relative

RotationType Enum

The manner in which the rotational part of a LocomotionEvent.Pose should be interpreted.
For example, if the LocomotionEvent.Rotation property of an event is RotationType.Relative, the rotation expressed in the pose should be understood as an addendum to be applied to the current rotation.

Enumeration Constants

Member
None
Velocity
Absolute
Relative