Class TeleportationMultiAnchorVolume
An interactable that teleports the user to a specific position and/or rotation defined by one of several anchors.
The volume designates a destination anchor upon first hover based on an ITeleportation
Inheritance
Implements
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit.Locomotion.Teleportation
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[AddComponentMenu("XR/Teleportation Multi-Anchor Volume", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.1/api/UnityEngine.XR.Interaction.Toolkit.Locomotion.Teleportation.TeleportationMultiAnchorVolume.html")]
[MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
public class TeleportationMultiAnchorVolume : BaseTeleportationInteractable, IXRActivateInteractable, IXRHoverInteractable, IXRSelectInteractable, IXRFocusInteractable, IXRInteractionStrengthInteractable, IXRInteractable, IXROverridesGazeAutoSelect, IXRReticleDirectionProvider
Properties
anchorTransforms
The transforms that represent the possible teleportation destinations.
Declaration
public List<Transform> anchorTransforms { get; }
Property Value
See Also
destinationAnchor
The transform representing the current teleportation destination. When destination
Declaration
public Transform destinationAnchor { get; }
Property Value
Type | Description |
---|---|
Transform |
See Also
destinationEvaluationFilter
The filter used to evaluate a teleportation destination from the list of anchors. This is the same as
the destination
Declaration
public ITeleportationVolumeAnchorFilter destinationEvaluationFilter { get; }
Property Value
Type | Description |
---|---|
ITeleportation |
See Also
destinationEvaluationProgress
A normalized representation of the current progress towards evaluating a destination anchor, depending on
destination
Declaration
public float destinationEvaluationProgress { get; }
Property Value
Type | Description |
---|---|
float |
See Also
destinationEvaluationSettings
Settings for how this volume evaluates a destination anchor.
Declaration
public TeleportVolumeDestinationSettingsDatumProperty destinationEvaluationSettings { get; set; }
Property Value
Type | Description |
---|---|
Teleport |
See Also
Methods
Awake()
See Mono
Declaration
protected override void Awake()
Overrides
See Also
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. |
Raycast |
raycastHit | The ray cast hit information from the interactor. |
Teleport |
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
GetAttachTransform(IXRInteractor)
Gets the Transform that serves as the attachment point for a given Interactor.
Declaration
public override Transform GetAttachTransform(IXRInteractor interactor)
Parameters
Type | Name | Description |
---|---|---|
IXRInteractor | interactor | The specific Interactor as context to get the attachment point for. |
Returns
Overrides
Remarks
This should typically return the Transform of a child GameObject or the transform itself.
See Also
OnDestroy()
See Mono
Declaration
protected override void OnDestroy()
Overrides
See Also
OnDrawGizmosSelected()
See Mono
Declaration
protected void OnDrawGizmosSelected()
See Also
OnHoverEntered(HoverEnterEventArgs)
The XRInteraction
Declaration
protected override void OnHoverEntered(HoverEnterEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Hover |
args | Event data containing the Interactor that is initiating the hover. |
Overrides
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
OnHoverExited(HoverExitEventArgs)
The XRInteraction
Declaration
protected override void OnHoverExited(HoverExitEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Hover |
args | Event data containing the Interactor that is ending the hover. |
Overrides
Remarks
args
is only valid during this method call, do not hold a reference to it.
See Also
ProcessInteractable(UpdatePhase)
The XRInteraction
Declaration
public override void ProcessInteractable(XRInteractionUpdateOrder.UpdatePhase updatePhase)
Parameters
Type | Name | Description |
---|---|---|
XRInteraction |
updatePhase | The update phase this is called during. |
Overrides
Remarks
Please see the XRInteraction
See Also
Events
destinationAnchorChanged
Calls the methods in its invocation list when the destination
Declaration
public event Action<TeleportationMultiAnchorVolume> destinationAnchorChanged
Event Type
Type | Description |
---|---|
Action<Teleportation |