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 AcceptDestination |
ArcEnd
: TeleportHit
[Get] |
Signature
TeleportHit ArcEnd |
ArcOrigin
: Pose
[Get] |
The starting point of the teleport arc.
Signature
Pose 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 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 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 TeleportTarget |
WhenLocomotionPerformed
: Action< LocomotionEvent > |
Signature
Action<LocomotionEvent> WhenLocomotionPerformed |
Awake
()
|
Signature
override void Awake() Returns override void |
ComputeCandidate
()
|
Signature
override TeleportInteractable ComputeCandidate() Returns override TeleportInteractable |
ComputeCandidateTiebreaker
(
a
, b
)
|
Signature
override int ComputeCandidateTiebreaker(TeleportInteractable a, TeleportInteractable b) Parameters Returns override int |
InteractableSelected
(
interactable
)
|
Signature
override void InteractableSelected(TeleportInteractable interactable) Parameters interactable: TeleportInteractableReturns override void |
Start
()
|
Signature
override void Start() Returns override void |
AcceptDestinationComputer
(
interactable
, destination
)
|
Delegate to accept or reject the selection of teleport destination.
Signature
delegate bool AcceptDestinationComputer(TeleportInteractable interactable, Pose destination) Parameters 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 CanSelect(TeleportInteractable interactable) Parameters interactable: TeleportInteractableReturns override bool |
ComputeCandidateDelegate
(
TeleportArc
, interactables
, tiebreaker
, hitPose
)
|
Delegate method used for calculating the best available interactable to teleport to.
Implement this delegate to create custom behaviors for the Interactor ComputeCandidate.
Signature
delegate TeleportInteractable ComputeCandidateDelegate(IPolyline TeleportArc, IEnumerable< TeleportInteractable > interactables, ComputeCandidateTiebreakerDelegate tiebreaker, out TeleportHit hitPose) Parameters interactables: IEnumerable< TeleportInteractable >
The list of available interactors whitin range of the arc
tiebreaker: ComputeCandidateTiebreakerDelegate
Method to break the tie when two interactables get the same result, note that this can be modified externally via Interactor.CandidateTiebreaker
|
ComputeCandidateTiebreakerDelegate
(
a
, b
)
|
Signature
delegate int ComputeCandidateTiebreakerDelegate(TeleportInteractable a, TeleportInteractable b) Parameters Returns delegate int |
HasValidDestination
()
|
Signature
bool HasValidDestination() Returns bool |
InjectAllTeleportInteractor
(
selector
)
|
Sets all required values for a dynamically instantiated GameObject.
Signature
void InjectAllTeleportInteractor(ISelector selector) Parameters selector: ISelectorReturns void |
InjectOptionalCandidateComputer
(
candidateComputer
)
|
Sets a custom strategy for computing the best teleport candidate.
Signature
void InjectOptionalCandidateComputer(ComputeCandidateDelegate candidateComputer) Parameters candidateComputer: ComputeCandidateDelegateReturns void |
InjectOptionalHmd
(
hmd
)
|
Sets the HMD (Head Mounted Display) for a dynamically instantiated GameObject.
Signature
void InjectOptionalHmd(IHmd hmd) Parameters hmd: IHmdReturns void |
InjectOptionalTeleportArc
(
teleportArc
)
|
Sets the teleport arc for a dynamically instantiated GameObject.
Signature
void InjectOptionalTeleportArc(IPolyline teleportArc) Parameters teleportArc: IPolylineReturns void |
InjectSelector
(
selector
)
|
Sets the selection mechanism for a dynamically instantiated GameObject.
Signature
void InjectSelector(ISelector selector) Parameters selector: ISelectorReturns void |