Class TeleportationProvider
The TeleportationProvider is responsible for moving the XR Origin to the desired location on the user's request.
Inheritance
TeleportationProvider
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
UnityEngine.Object.FindFirstObjectByType<T>()
UnityEngine.Object.FindAnyObjectByType<T>()
UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit
Syntax
[AddComponentMenu("XR/Locomotion/Teleportation Provider", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.4/api/UnityEngine.XR.Interaction.Toolkit.TeleportationProvider.html")]
public class TeleportationProvider : LocomotionProvider
Properties
currentRequest
The current teleportation request.
Declaration
protected TeleportRequest currentRequest { get; set; }
Property Value
Type | Description |
---|---|
TeleportRequest |
delayTime
The time (in seconds) to delay the teleportation once it is activated. This delay can be used, for example, as time to set a tunneling vignette effect as a VR comfort option.
Declaration
public float delayTime { get; set; }
Property Value
Type | Description |
---|---|
Single |
validRequest
Whether the current teleportation request is valid.
Declaration
protected bool validRequest { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Awake()
See MonoBehaviour.
Declaration
protected override void Awake()
Overrides
QueueTeleportRequest(TeleportRequest)
This function will queue a teleportation request within the provider.
Declaration
public virtual bool QueueTeleportRequest(TeleportRequest teleportRequest)
Parameters
Type | Name | Description |
---|---|---|
TeleportRequest | teleportRequest | The teleportation request to queue. |
Returns
Type | Description |
---|---|
Boolean | Returns true if successfully queued. Otherwise, returns false. |
Update()
See MonoBehaviour.
Declaration
protected virtual void Update()