API reference

LocomotionGate Class

Extends MonoBehaviour
This Gate reads the IHand orientation towards the shoulder and decides if it should be in Teleport mode or Turning mode.
It enables/disables said modes based on some InputIActiveStates (EnableShape and DisableShape). It outputs it result into two IActiveStates (for Teleport and Turn)

Protected Fields

_started : bool
Signature
bool Oculus.Interaction.Locomotion.LocomotionGate._started

Properties

ActiveMode : LocomotionMode
[Get]
The current active LocomotionMode determined by the shape and orientation of the assigned IHand.
Signature
LocomotionMode Oculus.Interaction.Locomotion.LocomotionGate.ActiveMode
CurrentAngle : float
[Get]
The current hand angle computed by this component, using the orientation of the Hand.
Signature
float Oculus.Interaction.Locomotion.LocomotionGate.CurrentAngle
Hand : IHand
[Get]
The IHand that provides orientation data to this component.
Signature
IHand Oculus.Interaction.Locomotion.LocomotionGate.Hand
StabilizationPose : Pose
[Get]
A pose used for hand stabilization, derived from the shoulder-to-hand orientation.
Signature
Pose Oculus.Interaction.Locomotion.LocomotionGate.StabilizationPose
WhenActiveModeChanged : Action< LocomotionModeEventArgs >
This event is raised whenever the active locomotion mode is changed (see ActiveMode).
Signature
Action<LocomotionModeEventArgs> Oculus.Interaction.Locomotion.LocomotionGate.WhenActiveModeChanged
WristDirection : Vector3
[Get]
The wrist direction of the Hand.
Signature
Vector3 Oculus.Interaction.Locomotion.LocomotionGate.WristDirection

Protected Methods

Awake ()
Signature
virtual void Oculus.Interaction.Locomotion.LocomotionGate.Awake()
Returns
void
OnDisable ()
Signature
virtual void Oculus.Interaction.Locomotion.LocomotionGate.OnDisable()
Returns
void
OnEnable ()
Signature
virtual void Oculus.Interaction.Locomotion.LocomotionGate.OnEnable()
Returns
void
Start ()
Signature
virtual void Oculus.Interaction.Locomotion.LocomotionGate.Start()
Returns
void

Methods

Cancel ()
Disables the Gate, forcing the user to perform the disable shape and then the enable shape
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.Cancel()
Returns
void
Disable ()
Disables the Gate, forcing the user to perform the enable shape
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.Disable()
Returns
void
InjectAllLocomotionGate ( hand , shoulder , enableShape , disableShape , turningState , teleportState , gateSections )
Injects all required dependencies for a dynamically instantiated LocomotionGate.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectAllLocomotionGate(IHand hand, Transform shoulder, IActiveState enableShape, IActiveState disableShape, VirtualActiveState turningState, VirtualActiveState teleportState, GateSection[] gateSections)
Parameters
hand: IHand
shoulder: Transform
enableShape: IActiveState
disableShape: IActiveState
turningState: VirtualActiveState
teleportState: VirtualActiveState
gateSections: GateSection []
Returns
void
InjectDisableShape ( disableShape )
Sets the underlying IActiveState disable shape for a dynamically instantiated LocomotionGate.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectDisableShape(IActiveState disableShape)
Parameters
disableShape: IActiveState
Returns
void
InjectEnableShape ( enableShape )
Sets the underlying IActiveState enable shape for a dynamically instantiated LocomotionGate.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectEnableShape(IActiveState enableShape)
Parameters
enableShape: IActiveState
Returns
void
InjectGateSections ( gateSections )
Sets the underlying GateSection set for a dynamically instantiated LocomotionGate.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectGateSections(GateSection[] gateSections)
Parameters
gateSections: GateSection []
Returns
void
InjectHand ( hand )
Sets the underlying IHand for a dynamically instantiated LocomotionGate.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectHand(IHand hand)
Parameters
hand: IHand
Returns
void
InjectShoulder ( shoulder )
Sets the underlying shoulder transform for a dynamically instantiated LocomotionGate.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectShoulder(Transform shoulder)
Parameters
shoulder: Transform
Returns
void
InjectTeleportState ( teleportState )
Sets the underlying VirtualActiveState for a dynamically instantiated LocomotionGate representing the teleport state.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectTeleportState(VirtualActiveState teleportState)
Parameters
teleportState: VirtualActiveState
Returns
void
InjectTurningState ( turningState )
Sets the underlying VirtualActiveState for a dynamically instantiated LocomotionGate representing the turning state.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectTurningState(VirtualActiveState turningState)
Parameters
turningState: VirtualActiveState
Returns
void

Inner Class

GateSection Class

Contains threshold data used to map hand orientation to LocomotionMode.

Fields

canEnterDirectly : bool
Determines if this gate can be entered from LocomotionMode.None, or if it must be entered from another gate.
Signature
bool Oculus.Interaction.Locomotion.LocomotionGate.GateSection.canEnterDirectly
locomotionMode : LocomotionMode
The locomotion mode that this gate represents.
Signature
LocomotionMode Oculus.Interaction.Locomotion.LocomotionGate.GateSection.locomotionMode
maxAngle : float
The maximum detection angle.
Signature
float Oculus.Interaction.Locomotion.LocomotionGate.GateSection.maxAngle
minAngle : float
The minimum detection angle.
Signature
float Oculus.Interaction.Locomotion.LocomotionGate.GateSection.minAngle

Methods

ScoreToAngle ( angle )
Translates the provided angle to a scoring factor, which is used to determine which gate should be entered.
Signature
float Oculus.Interaction.Locomotion.LocomotionGate.GateSection.ScoreToAngle(float angle)
Parameters
angle: float  The input angle to score.
Returns
float  The score of this gate determined by the input angle.

Inner Enum

LocomotionMode Enum

Set of locomotion modes supported by this component - see ActiveMode.

Enumeration Constants

Member
None
Teleport
Turn