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

LocomotionActionsBroadcaster Class

Extends MonoBehaviour
LocomotionActionsBroadcaster generates LocomotionEvents without a Translation or Rotation but decorates them with extra information regarding instantaneous locomotion actions that can be consumed by a Locomotor.
Decorations are only active during the WhenLocomotionPerformed event and should be consumed and managed by the specific implementations

Fields

Identifier : int
Signature
int Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.Identifier

Events

WhenLocomotionPerformed : Action< LocomotionEvent >
Signature
Action<LocomotionEvent> Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.WhenLocomotionPerformed

Protected Methods

Awake ()
Signature
virtual void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.Awake()
Returns
void

Methods

Crouch ()
Sends an immediate Crouch Action down the LocomotionEvent pipeline
Signature
void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.Crouch()
Returns
void
InjectOptionalContext ( context )
Signature
void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.InjectOptionalContext(Context context)
Parameters
context: Context
Returns
void
Invalid ( pose )
Marks the locomotionEvent as an invalid target
Signature
void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.Invalid(Pose pose)
Parameters
pose: Pose
Returns
void
Jump ()
Sends an immediate default Jump Action down the LocomotionEvent pipeline
Signature
void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.Jump()
Returns
void
Jump ( force )
Sends an immediate Jump Action down the LocomotionEvent pipeline
Signature
void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.Jump(Vector3 force)
Parameters
force: Vector3  The force to be applied to the jump
Returns
void
Run ()
Sends an immediate Run Action down the LocomotionEvent pipeline
Signature
void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.Run()
Returns
void
Select ()
Marks the LocomotionEvent as a Select event
Signature
void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.Select()
Returns
void
SendLocomotionAction ( action )
Sends an Action down the LocomotionEvent pipeline and inmediately disposes it
Signature
void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.SendLocomotionAction(LocomotionAction action)
Parameters
action: LocomotionAction  The action to be sent
Returns
void
SendLocomotionAction ( action , target )
Sends an Action down the LocomotionEvent pipeline and inmediately disposes it
Signature
void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.SendLocomotionAction(LocomotionAction action, Pose target)
Parameters
action: LocomotionAction  The action to be sent
target: Pose  The pose to associate with the action
Returns
void
StandUp ()
Sends an immediate StandUp Action down the LocomotionEvent pipeline
Signature
void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.StandUp()
Returns
void
ToggleCrouch ()
Sends an immediate ToggleCrouch Action down the LocomotionEvent pipeline
Signature
void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.ToggleCrouch()
Returns
void
ToggleRun ()
Sends an immediate ToggleRun Action down the LocomotionEvent pipeline
Signature
void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.ToggleRun()
Returns
void
Walk ()
Sends an immediate Walk Action down the LocomotionEvent pipeline
Signature
void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.Walk()
Returns
void

Static Methods

CreateLocomotionEventAction ( identifier , action , pose , context )
This utility method allows creating LocomotionAction decorations
Signature
static LocomotionEvent Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.CreateLocomotionEventAction(int identifier, LocomotionAction action, Pose pose=default, Context context=null)
Parameters
identifier: int  The identifier of the sender
action: LocomotionAction  The action to send
pose: Pose  The pose to be sent in the LocomotionEvent, note that this won't have any Translation or Rotation applied
context: Context  The context used for storing the decoration
Returns
LocomotionEvent  The LocomotionEvent decorated with the action
DisposeLocomotionAction ( locomotionEvent , context )
This utility method removes the LocomotionAction decoration from the LocomotionEvent.
These decorations are not automatically removed, so it is important to manually call this method to avoid filling the memory with obsolete decorations
Signature
static void Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.DisposeLocomotionAction(LocomotionEvent locomotionEvent, Context context=null)
Parameters
locomotionEvent: LocomotionEvent  The event containing the LocomotionAction decoration.
context: Context  The context storing the decoration
Returns
void
TryGetLocomotionActions ( locomotionEvent , action , context )
This utility methods allows retrieving the LocomotionAction from a given LocomotionEvent, if it contains one.
Signature
static bool Oculus.Interaction.Locomotion.LocomotionActionsBroadcaster.TryGetLocomotionActions(LocomotionEvent locomotionEvent, out LocomotionAction action, Context context=null)
Parameters
locomotionEvent: LocomotionEvent  The LocomotionEvent potentially containing the LocomotionAction
action: out LocomotionAction  The LocomotionAction that it contained
context: Context  The context used for storing the decoration
Returns
bool  True if the LocomotionEvent contained a valid LocomotionAction

Inner Enum

LocomotionAction Enum

Enumeration Constants

Member
Crouch
StandUp
ToggleCrouch
Run
Walk
ToggleRun
Jump
InvalidTarget
Select