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 a ITeleportationVolumeAnchorFilter.
Inheritance
Implements
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit
Assembly: solution.dll
Syntax
[AddComponentMenu("XR/Teleportation Multi-Anchor Volume", 11)]
[HelpURL("https://docs.unity.cn/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.TeleportationMultiAnchorVolume.html")]
public class TeleportationMultiAnchorVolume : BaseTeleportationInteractable, IXRActivateInteractable, IXRHoverInteractable, IXRSelectInteractable, IXRFocusInteractable, IXRInteractionStrengthInteractable, IXRInteractable, IXROverridesGazeAutoSelect, IXRReticleDirectionProvider
Properties
| Name | Description |
|---|---|
| anchorTransforms | The transforms that represent the possible teleportation destinations. |
| destinationAnchor | The transform representing the current teleportation destination. When destinationEvaluationProgress is 1, this will be one of the transforms in anchorTransforms. Otherwise, this will be null. |
| destinationEvaluationFilter | The filter used to evaluate a teleportation destination from the list of anchors. This is the same as the destinationEvaluationFilter in destinationEvaluationSettings unless that value is null, in which case this will return an instance of FurthestTeleportationAnchorFilter. |
| destinationEvaluationProgress | A normalized representation of the current progress towards evaluating a destination anchor, depending on destinationEvaluationSettings. This value is 0 while not hovered. If enableDestinationEvaluationDelay is true, this value will start at 0 when initiating destination evaluation (either upon first hover or when re-evaluation occurs due to pollForDestinationChange) and will increase to 1 over the course of destinationEvaluationDelayTime seconds while hovered. Otherwise, this value will be 1 while hovered. This resets to 0 after the volume creates a teleport request. |
| destinationEvaluationSettings | Settings for how this volume evaluates a destination anchor. |
Methods
| Name | Description |
|---|---|
| Awake() | See MonoBehaviour. |
| 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. |
| GetAttachTransform(IXRInteractor) | Gets the Transform that serves as the attachment point for a given Interactor. |
| OnDestroy() | See MonoBehaviour. |
| OnDrawGizmosSelected() | See MonoBehaviour. |
| OnHoverEntered(HoverEnterEventArgs) | The XRInteractionManager calls this method when the Interactor first initiates hovering over an Interactable in a second pass. |
| OnHoverExited(HoverExitEventArgs) | The XRInteractionManager calls this method when the Interactor ends hovering over an Interactable in a second pass. |
| ProcessInteractable(UpdatePhase) | The XRInteractionManager calls this method to update the Interactable. |
Events
| Name | Description |
|---|---|
| destinationAnchorChanged | Calls the methods in its invocation list when the destinationAnchor changes. |