Class TeleportationArea
An area is a teleportation destination which teleports the user to their pointed location on a surface.
Inheritance
TeleportationArea
Implements
Inherited Members
BaseTeleportationInteractable.GetReticleDirection(IXRInteractor, Vector3, out Vector3, out Vector3?)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit.Locomotion.Teleportation
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("XR/Teleportation Area", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.Locomotion.Teleportation.TeleportationArea.html")]
[MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
public class TeleportationArea : BaseTeleportationInteractable, IXRActivateInteractable, IXRHoverInteractable, IXRSelectInteractable, IXRFocusInteractable, IXRInteractionStrengthInteractable, IXRInteractable, IXROverridesGazeAutoSelect, IXRReticleDirectionProvider
Methods
GenerateTeleportRequest(IXRInteractor, RaycastHit, ref TeleportRequest)
Automatically called upon the teleport trigger event occurring to generate the teleport request. The teleportation destination pose should be filled out.
Declaration
protected override bool GenerateTeleportRequest(IXRInteractor interactor, RaycastHit raycastHit, ref TeleportRequest teleportRequest)
Parameters
Type | Name | Description |
---|---|---|
IXRInteractor | interactor | The interactor that initiated the teleport trigger. |
RaycastHit | raycastHit | The ray cast hit information from the interactor. |
TeleportRequest | teleportRequest | The teleport request that should be filled out during this method call. |
Returns
Type | Description |
---|---|
bool | Returns true if the teleport request was successfully updated and should be queued. Otherwise, returns false. |
Overrides
See Also
IsSelectableBy(IXRSelectInteractor)
Determines if a given Interactor can select this Interactable.
Declaration
public override bool IsSelectableBy(IXRSelectInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
IXRSelectInteractor | interactor | Interactor to check for a valid selection with. |
Returns
Type | Description |
---|---|
bool | Returns true if selection is valid this frame. Returns false if not. |