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

TeleportInteractable Class

A target to which a TeleportInteractor can teleport.
This class encapsulates the target-specific information the teleportation interaction needs in order to execute properly, including the location, targeting information, and optionally details about how the player should be positioned after teleport.

Properties

Indicates if the interactable is valid for teleport.
Setting it to false can be convenient to block the arc (this will cause TeleportInteractor.HasValidDestination to return false).
An override for the Interactor EqualDistanceThreshold used when comparing the interactable against other interactables that do not allow teleport.
This can allow an interactable to more easily "present itself as equidistant" to something else, increasing the ease of selecting it specifically in preference to other interactions.
Establishes the priority when several interactables are hit at the same time (EqualDistanceThreshold) by the arc.
Overriding equivalence comparison with EqualDistanceToBlockerOverride will cause this value to be consulted more frequently.
The surface against which the interactor will check collisions with TeleportInteractor.TeleportArc.
By default, the precise collision point will be treated as the teleport target destination, which is useful when specifying a single large teleport target (such as the floor of a room) as a single interactable. However, this can be overridden by supplying a target point (see TargetPose(Pose)), which if provided will supersede the actual collision and allow the interactable to function as a "hotspot" target moving the player to a specific location.
The bounds constraining the region from which this interactable can be targeted.
This can be used to disallow targeting of an interactable from beyond a certain range.
Specifies whether teleporting to this interactable should override the player's orientation to match that of the target point (see TargetPose(Pose)).
This is useful for scenarios such as a "hotspot" in front of a control panel, where the goal is to make it easy for the player to quickly stand in a certain spot facing a certain direction. Note that this setting is only meaningful if a target point is supplied.
Allows overriding the default teleport behavior, which aligns the user's feet/floor with the teleport target, to instead align the user's head/eyes to the target.
This is useful for scenarios such as a "hotspot" in front of a window, where the goal is to make it easy for the player to quickly stand in a certain spot and see something specific. Note that this setting is only meaningful if a target point is supplied (see TargetPose(Pose)).

Protected Functions

virtual override void Awake ( )
virtual override void Start ( )

Member Functions

Determines if a TeleportInteractor is close enough to target this interactable.
This is called by internal logic of TeleportInteractor and should not be invoked independently.
Detects a hit from the teleport raycast on the object.
Parameters
from
The origin, in world space from which to cast the ray
to
The target, in world space, through which the cast ray should pass(in
hit
Information about the hit, if one occurred
Returns
True if a hit was detected, false otherwise
Used when the interactor is looking for a teleport target.
If you specify a target point, it'll use that. Otherwise it uses wherever the teleport arc is pointing.
Injects all required dependencies for a dynamically instantiated TeleportInteractable; effectively wraps InjectSurface(ISurface), since all other dependencies are optional.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets an ISurface for a dynamically instantiated TeleportInteractable.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Sets the target point (see TargetPose(Pose) for a dynamically instantiated TeleportInteractable.
This method exists to support Interaction SDK's dependency injection pattern and is not needed for typical Unity Editor-based usage.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon