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

LocomotionGate Class

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

Protected Fields

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

Properties

ActiveMode : LocomotionMode
[Get]
Signature
LocomotionMode Oculus.Interaction.Locomotion.LocomotionGate.ActiveMode
CurrentAngle : float
[Get]
Signature
float Oculus.Interaction.Locomotion.LocomotionGate.CurrentAngle
Hand : IHand
[Get]
Signature
IHand Oculus.Interaction.Locomotion.LocomotionGate.Hand
StabilizationPose : Pose
[Get]
Signature
Pose Oculus.Interaction.Locomotion.LocomotionGate.StabilizationPose
WhenActiveModeChanged : Action< LocomotionModeEventArgs >
Signature
Action<LocomotionModeEventArgs> Oculus.Interaction.Locomotion.LocomotionGate.WhenActiveModeChanged
WristDirection : Vector3
[Get]
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 )
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 )
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectDisableShape(IActiveState disableShape)
Parameters
disableShape: IActiveState
Returns
void
InjectEnableShape ( enableShape )
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectEnableShape(IActiveState enableShape)
Parameters
enableShape: IActiveState
Returns
void
InjectGateSections ( gateSections )
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectGateSections(GateSection[] gateSections)
Parameters
gateSections: GateSection[]
Returns
void
InjectHand ( hand )
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectHand(IHand hand)
Parameters
hand: IHand
Returns
void
InjectShoulder ( shoulder )
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectShoulder(Transform shoulder)
Parameters
shoulder: Transform
Returns
void
InjectTeleportState ( teleportState )
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectTeleportState(VirtualActiveState teleportState)
Parameters
teleportState: VirtualActiveState
Returns
void
InjectTurningState ( turningState )
Signature
void Oculus.Interaction.Locomotion.LocomotionGate.InjectTurningState(VirtualActiveState turningState)
Parameters
turningState: VirtualActiveState
Returns
void

Inner Class

GateSection Class

Fields

canEnterDirectly : bool
Signature
bool Oculus.Interaction.Locomotion.LocomotionGate.GateSection.canEnterDirectly
locomotionMode : LocomotionMode
Signature
LocomotionMode Oculus.Interaction.Locomotion.LocomotionGate.GateSection.locomotionMode
maxAngle : float
Signature
float Oculus.Interaction.Locomotion.LocomotionGate.GateSection.maxAngle
minAngle : float
Signature
float Oculus.Interaction.Locomotion.LocomotionGate.GateSection.minAngle

Methods

ScoreToAngle ( angle )
Signature
float Oculus.Interaction.Locomotion.LocomotionGate.GateSection.ScoreToAngle(float angle)
Parameters
angle: float
Returns
float

Inner Struct

LocomotionModeEventArgs Struct

Constructors

LocomotionModeEventArgs ( previousMode , newMode )
Signature
Oculus.Interaction.Locomotion.LocomotionGate.LocomotionModeEventArgs.LocomotionModeEventArgs(LocomotionMode previousMode, LocomotionMode newMode)
Parameters
previousMode: LocomotionMode
newMode: LocomotionMode

Properties

NewMode : LocomotionMode
[Get]
Signature
LocomotionMode Oculus.Interaction.Locomotion.LocomotionGate.LocomotionModeEventArgs.NewMode
PreviousMode : LocomotionMode
[Get]
Signature
LocomotionMode Oculus.Interaction.Locomotion.LocomotionGate.LocomotionModeEventArgs.PreviousMode

Inner Enum

LocomotionMode Enum

Enumeration Constants

Member
None
Teleport
Turn