Class TeleportationAnchor
An anchor is a teleportation destination which teleports the user to a pre-determined specific position and/or rotation.
Inherited Members
Namespace: UnityEngine.XR.Interaction.Toolkit
Syntax
public class TeleportationAnchor : BaseTeleportationInteractable
Properties
teleportAnchorTransform
The
Declaration
public Transform teleportAnchorTransform { get; set; }
Property Value
Type | Description |
---|---|
Transform |
Methods
GenerateTeleportRequest(XRBaseInteractor, RaycastHit, ref TeleportRequest)
Generates a teleport request.
Declaration
protected override bool GenerateTeleportRequest(XRBaseInteractor interactor, RaycastHit raycastHit, ref TeleportRequest teleportRequest)
Parameters
Type | Name | Description |
---|---|---|
XRBaseInteractor | interactor | The interactor generating the teleport request. |
RaycastHit | raycastHit | The raycast hit where user will be teleported to. |
TeleportRequest | teleportRequest | The teleport request. |
Returns
Type | Description |
---|---|
Boolean | Returns true if button teleportation was successful. Otherwise, returns false. |
Overrides
OnDrawGizmos()
Called when gizmos are drawn.
Declaration
protected void OnDrawGizmos()
OnValidate()
See
Declaration
protected void OnValidate()