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

TeleportInteractor Class

TeleportInteractor uses a provided ITeleportArc and an external Selector to find the best interactable and emit the event requesting a teleport to it.
By itself it does not define the shape of the arc or even moves the player, instead it is the core class that brings these pieces together.

Properties

AcceptDestination : AcceptDestinationComputer
[Get][Set]
This optional delegate method offers one chance to accept or reject a valid target destination.
It will be executed upon the current Interactable and desired target Pose in order to allow selection.
Return true to allow Selection, false to disallow selection. When it is not set, it always allows to select valid interactables.
Signature
AcceptDestinationComputer Oculus.Interaction.Locomotion.TeleportInteractor.AcceptDestination
ArcEnd : TeleportHit
[Get]
Signature
TeleportHit Oculus.Interaction.Locomotion.TeleportInteractor.ArcEnd
ArcOrigin : Pose
[Get]
The starting point of the teleport arc.
Signature
Pose Oculus.Interaction.Locomotion.TeleportInteractor.ArcOrigin
EqualDistanceThreshold : float
[Get][Set]
(Meters, World) The threshold below which distances to a interactable are treated as equal for the purposes of ranking.
Signature
float Oculus.Interaction.Locomotion.TeleportInteractor.EqualDistanceThreshold
TeleportArc : IPolyline
[Get]
Specifies the shape of the arc used for detecting available interactables.
If none is provided TeleportArcGravity will be used.
Signature
IPolyline Oculus.Interaction.Locomotion.TeleportInteractor.TeleportArc
TeleportTarget : Pose
[Get]
The location to teleport to.
If the interactor has an interactable, then that's the teleport location. Otherwise it just projects the end of the arc onto the ground and uses that as the target.
Signature
Pose Oculus.Interaction.Locomotion.TeleportInteractor.TeleportTarget
WhenLocomotionPerformed : Action< LocomotionEvent >
Signature
Action<LocomotionEvent> Oculus.Interaction.Locomotion.TeleportInteractor.WhenLocomotionPerformed

Protected Methods

Awake ()
Signature
override void Oculus.Interaction.Locomotion.TeleportInteractor.Awake()
Returns
override void
ComputeCandidate ()
Signature
override TeleportInteractable Oculus.Interaction.Locomotion.TeleportInteractor.ComputeCandidate()
Returns
override TeleportInteractable
ComputeCandidateTiebreaker ( a , b )
Signature
override int Oculus.Interaction.Locomotion.TeleportInteractor.ComputeCandidateTiebreaker(TeleportInteractable a, TeleportInteractable b)
Returns
override int
InteractableSelected ( interactable )
Signature
override void Oculus.Interaction.Locomotion.TeleportInteractor.InteractableSelected(TeleportInteractable interactable)
Parameters
interactable: TeleportInteractable
Returns
override void
Start ()
Signature
override void Oculus.Interaction.Locomotion.TeleportInteractor.Start()
Returns
override void

Methods

AcceptDestinationComputer ( interactable , destination )
Delegate to accept or reject the selection of teleport destination.
Signature
delegate bool Oculus.Interaction.Locomotion.TeleportInteractor.AcceptDestinationComputer(TeleportInteractable interactable, Pose destination)
Parameters
interactable: TeleportInteractable  The interactable the interactor wants to teleport to.
destination: Pose  The final Pose the interactor wants to move to.
Returns
delegate bool  True if the destination is accepted, false if rejected.
CanSelect ( interactable )
Signature
override bool Oculus.Interaction.Locomotion.TeleportInteractor.CanSelect(TeleportInteractable interactable)
Parameters
interactable: TeleportInteractable
Returns
override bool
HasValidDestination ()
Signature
bool Oculus.Interaction.Locomotion.TeleportInteractor.HasValidDestination()
Returns
bool
InjectAllTeleportInteractor ( selector )
Sets all required values for a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.Locomotion.TeleportInteractor.InjectAllTeleportInteractor(ISelector selector)
Parameters
selector: ISelector
Returns
void
InjectOptionalHmd ( hmd )
Sets the HMD (Head Mounted Display) for a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.Locomotion.TeleportInteractor.InjectOptionalHmd(IHmd hmd)
Parameters
hmd: IHmd
Returns
void
InjectOptionalTeleportArc ( teleportArc )
Sets the teleport arc for a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.Locomotion.TeleportInteractor.InjectOptionalTeleportArc(IPolyline teleportArc)
Parameters
teleportArc: IPolyline
Returns
void
InjectSelector ( selector )
Sets the selection mechanism for a dynamically instantiated GameObject.
Signature
void Oculus.Interaction.Locomotion.TeleportInteractor.InjectSelector(ISelector selector)
Parameters
selector: ISelector
Returns
void