API reference

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 _started

Properties

ActiveMode : LocomotionMode
[Get]
Signature
LocomotionMode ActiveMode
CurrentAngle : float
[Get]
Signature
float CurrentAngle
Hand : IHand
[Get]
Signature
IHand Hand
StabilizationPose : Pose
[Get]
Signature
Pose StabilizationPose
WhenActiveModeChanged : Action< LocomotionModeEventArgs >
Signature
Action<LocomotionModeEventArgs> WhenActiveModeChanged
WristDirection : Vector3
[Get]
Signature
Vector3 WristDirection

Protected Methods

Awake ()
Signature
virtual void Awake()
Returns
void
OnDisable ()
Signature
virtual void OnDisable()
Returns
void
OnEnable ()
Signature
virtual void OnEnable()
Returns
void
Start ()
Signature
virtual void Start()
Returns
void

Methods

Cancel ()
Disables the Gate, forcing the user to perform the disable shape and then the enable shape.
Signature
void Cancel()
Returns
void
Disable ()
Disables the Gate, forcing the user to perform the enable shape.
Signature
void Disable()
Returns
void
InjectAllLocomotionGate ( hand , shoulder , enableShape , disableShape , turningState , teleportState , gateSections )
Signature
void 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 InjectDisableShape(IActiveState disableShape)
Parameters
disableShape: IActiveState
Returns
void
InjectEnableShape ( enableShape )
Signature
void InjectEnableShape(IActiveState enableShape)
Parameters
enableShape: IActiveState
Returns
void
InjectGateSections ( gateSections )
Signature
void InjectGateSections(GateSection[] gateSections)
Parameters
gateSections: GateSection[]
Returns
void
InjectHand ( hand )
Signature
void InjectHand(IHand hand)
Parameters
hand: IHand
Returns
void
InjectShoulder ( shoulder )
Signature
void InjectShoulder(Transform shoulder)
Parameters
shoulder: Transform
Returns
void
InjectTeleportState ( teleportState )
Signature
void InjectTeleportState(VirtualActiveState teleportState)
Parameters
teleportState: VirtualActiveState
Returns
void
InjectTurningState ( turningState )
Signature
void InjectTurningState(VirtualActiveState turningState)
Parameters
turningState: VirtualActiveState
Returns
void

Inner Class

GateSection Class

Fields

canEnterDirectly : bool
Signature
bool canEnterDirectly
locomotionMode : LocomotionMode
Signature
LocomotionMode locomotionMode
maxAngle : float
Signature
float maxAngle
minAngle : float
Signature
float minAngle

Methods

ScoreToAngle ( angle )
Signature
float ScoreToAngle(float angle)
Parameters
angle: float
Returns
float

Inner Struct

LocomotionModeEventArgs Struct

Constructors

LocomotionModeEventArgs ( previousMode , newMode )
Signature
LocomotionModeEventArgs(LocomotionMode previousMode, LocomotionMode newMode)
Parameters
previousMode: LocomotionMode
newMode: LocomotionMode

Properties

NewMode : LocomotionMode
[Get]
Signature
LocomotionMode NewMode
PreviousMode : LocomotionMode
[Get]
Signature
LocomotionMode PreviousMode

Inner Enum

LocomotionMode Enum

Enumeration Constants

Member
None
Teleport
Turn