Editar

Compartilhar via


TeleportPointer Class

Definition

Implementation for teleportation pointer to support movement based on teleport raycasts and requests with the MRTK Teleport system

public ref class TeleportPointer : Microsoft::MixedReality::Toolkit::Input::CurvePointer, Microsoft::MixedReality::Toolkit::Input::IMixedRealityTeleportPointer, Microsoft::MixedReality::Toolkit::Teleport::IMixedRealityTeleportHandler, System::Collections::IEqualityComparer, UnityEngine::EventSystems::IEventSystemHandler
[UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/TeleportPointer")]
[UnityEngine.RequireComponent(typeof(Microsoft.MixedReality.Toolkit.Physics.DistorterGravity))]
public class TeleportPointer : Microsoft.MixedReality.Toolkit.Input.CurvePointer, Microsoft.MixedReality.Toolkit.Input.IMixedRealityTeleportPointer, Microsoft.MixedReality.Toolkit.Teleport.IMixedRealityTeleportHandler, System.Collections.IEqualityComparer, UnityEngine.EventSystems.IEventSystemHandler
[<UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/TeleportPointer")>]
[<UnityEngine.RequireComponent(typeof(Microsoft.MixedReality.Toolkit.Physics.DistorterGravity))>]
type TeleportPointer = class
    inherit CurvePointer
    interface IMixedRealityTeleportPointer
    interface IMixedRealityPointer
    interface IEqualityComparer
    interface IMixedRealityTeleportHandler
    interface IEventSystemHandler
Public Class TeleportPointer
Inherits CurvePointer
Implements IEqualityComparer, IEventSystemHandler, IMixedRealityTeleportHandler, IMixedRealityTeleportPointer
Inheritance
Derived
Attributes
UnityEngine.AddComponentMenuAttribute UnityEngine.RequireComponentAttribute
Implements

Constructors

TeleportPointer()

Fields

grabAction (Inherited from BaseControllerPointer)
HasSelectPressedOnce

True if select has been pressed once since this component was enabled

(Inherited from BaseControllerPointer)
InvalidLayers
IsGrabPressed

True if grab is pressed right now

(Inherited from BaseControllerPointer)
IsHoldPressed (Inherited from BaseControllerPointer)
IsSelectPressed

True if select is pressed right now

(Inherited from BaseControllerPointer)
isTeleportRequestActive
LineCastResolution (Inherited from CurvePointer)
LineColorHotSpot
LineColorInvalid (Inherited from LinePointer)
LineColorLockFocus (Inherited from LinePointer)
LineColorNoTarget (Inherited from LinePointer)
LineColorSelected (Inherited from LinePointer)
LineColorValid (Inherited from LinePointer)
pointerAction (Inherited from BaseControllerPointer)
raycastOrigin (Inherited from BaseControllerPointer)
TrackingState

The current tracking state of the assigned IMixedRealityController

(Inherited from ControllerPoseSynchronizer)
ValidLayers
ValidTeleportationLayers

Properties

BaseCursor

The pointer's cursor.

(Inherited from BaseControllerPointer)
Controller

The pointer's current controller reference.

(Inherited from BaseControllerPointer)
CursorModifier

The currently active cursor modifier.

(Inherited from BaseControllerPointer)
DefaultPointerExtent

The length of the pointer when nothing is hit.

(Inherited from BaseControllerPointer)
DestroyOnSourceLost

Should this GameObject clean itself up when its controller is lost?

(Inherited from ControllerPoseSynchronizer)
DisableCursorOnStart (Inherited from BaseControllerPointer)
FocusTarget

The currently focused target.

(Inherited from BaseControllerPointer)
GravityDistorter

The Gravity Distorter that is affecting the BaseMixedRealityLineDataProvider attached to this pointer.

Handedness

The controller handedness this component is synchronized with.

(Inherited from ControllerPoseSynchronizer)
InputSourceParent
Obsolete.

This pointer's input source parent.

(Inherited from BaseControllerPointer)
InvalidTeleportationLayers
IsActive

Controls whether the pointer dispatches input.

(Inherited from BaseControllerPointer)
IsFocusLocked

Is the focus for this pointer currently locked?

(Inherited from BaseControllerPointer)
IsInteractionEnabled

Is the pointer active and have the conditions for the interaction been satisfied to enable the interaction?

IsTargetPositionLockedOnFocusLock

Specifies whether the pointer's target position (cursor) is locked to the target object when focus is locked. Most pointers want the cursor to "stick" to the object when manipulating, so set this to true by default.

(Inherited from BaseControllerPointer)
IsTracked

Is the controller this Synchronizer is registered to currently tracked?

(Inherited from ControllerPoseSynchronizer)
LineBase

The Line Data Provider driving this pointer.

(Inherited from LinePointer)
LineRenderers

The current line renderers that this pointer is utilizing.

(Inherited from LinePointer)
PointerExtent

Maximum distance at which all pointers can collide with a GameObject, unless it has an override extent.

(Inherited from BaseControllerPointer)
PointerId

This pointer's id.

(Inherited from BaseControllerPointer)
PointerName

This pointer's name.

(Inherited from BaseControllerPointer)
PointerOrientation

The Y orientation of the pointer - used for touchpad rotation and navigation

PoseAction

The input action that will drive the Transform's pose, position, or rotation.

(Inherited from ControllerPoseSynchronizer)
Position

Pointer position.

(Inherited from BaseControllerPointer)
PrioritizedLayerMasksOverride

The physics layers to use when performing scene queries.

PrioritizedLayerMasksOverride

The physics layers to use when performing scene queries.

(Inherited from BaseControllerPointer)
Rays

The scene query rays.

(Inherited from BaseControllerPointer)
RayStabilizer

Ray stabilizer used when calculating position of pointer end point.

(Inherited from BaseControllerPointer)
Result

The scene query pointer result.

(Inherited from BaseControllerPointer)
Rotation

Pointer rotation.

(Inherited from BaseControllerPointer)
SceneQueryType

The type of physics scene query to use.

(Inherited from BaseControllerPointer)
SphereCastRadius

The radius to use when SceneQueryType is set to Sphere or SphereColliders.

(Inherited from BaseControllerPointer)
TeleportHotspot

The currently active teleport hotspot.

TeleportHotSpot

The currently active teleport hotspot.

TeleportHotSpotCursorVisibility

Teleport pointer cursor visibility if pointer is focused on hotspot

TeleportInputAction

Teleport Pointer will only respond to input events for teleportation that match this MixedRealityInputAction

TeleportRequestRaised

True if a teleport request is being raised, false otherwise.

TeleportSurfaceResult

The result from the last raycast.

UseSourcePoseAsFallback

Should the Transform's position use the source pose by default until the input handler events are received?

(Inherited from ControllerPoseSynchronizer)
UseSourcePoseData

Should the Transform's position be driven from the source pose or from input handler?

(Inherited from ControllerPoseSynchronizer)

Methods

EnsureInputSystemValid()

A task that will only complete when the input system has in a valid state.

(Inherited from InputSystemGlobalHandlerListener)
Equals(Object) (Inherited from BaseControllerPointer)
GetHashCode() (Inherited from BaseControllerPointer)
GetLineGradient(TeleportSurfaceResult)
InputEventDataUsable<T>(InputEventData<T>)

Helper function used to determine whether or not the controller pose synchronizer is configured to make use of the InputEventData

(Inherited from ControllerPoseSynchronizer)
OnDisable()
OnEnable()
OnInputChanged(InputEventData<MixedRealityPose>)

Raised input event updates from the type of input specified in the interface handler implementation.

(Inherited from ControllerPoseSynchronizer)
OnInputChanged(InputEventData<Quaternion>)

Raised input event updates from the type of input specified in the interface handler implementation.

(Inherited from ControllerPoseSynchronizer)
OnInputChanged(InputEventData<Single>)

Raised input event updates from the type of input specified in the interface handler implementation.

(Inherited from ControllerPoseSynchronizer)
OnInputChanged(InputEventData<Vector2>)

Raised input event updates from the type of input specified in the interface handler implementation.

OnInputChanged(InputEventData<Vector3>)

Raised input event updates from the type of input specified in the interface handler implementation.

(Inherited from ControllerPoseSynchronizer)
OnInputDown(InputEventData) (Inherited from BaseControllerPointer)
OnInputUp(InputEventData) (Inherited from BaseControllerPointer)
OnPostSceneQuery()

Called after performing the scene query.

OnPreCurrentPointerTargetChange()

Called during the scene query just before the current pointer target changes.

(Inherited from BaseControllerPointer)
OnPreSceneQuery()

Called before performing the scene query.

OnSceneQuery(LayerMask[], Boolean, GameObject, Vector3, Single)

Called to have the pointer query the scene to determine which objects it is hitting. Updates hitObject, hitPoint, and hitDistance. Used when the method for querying the scene does not utilize a RaycastHit. Examples of this include UnityEngine.Physics.SphereOverlap, which performs no raycast calls

(Inherited from BaseControllerPointer)
OnSceneQuery(LayerMask[], Boolean, MixedRealityRaycastHit, RayStep, Int32)

Called to have the pointer query the scene to determine which objects it is hitting. Updates hitinfo. Used when the method for querying the scene utilizes a RaycastHit, such as when using UnityEngine.Physics.Raycast

(Inherited from BaseControllerPointer)
OnSourceDetected(SourceStateEventData)

Raised when a source is detected.

(Inherited from ControllerPoseSynchronizer)
OnSourceLost(SourceStateEventData) (Inherited from BaseControllerPointer)
OnSourcePoseChanged(SourcePoseEventData<MixedRealityPose>)

Raised when the source pose is changed.

(Inherited from ControllerPoseSynchronizer)
OnSourcePoseChanged(SourcePoseEventData<Quaternion>)

Raised when the source rotation is changed.

(Inherited from ControllerPoseSynchronizer)
OnSourcePoseChanged(SourcePoseEventData<TrackingState>)

Raised when the source pose tracking state is changed.

(Inherited from ControllerPoseSynchronizer)
OnSourcePoseChanged(SourcePoseEventData<Vector2>)

Raised when the source position is changed.

(Inherited from ControllerPoseSynchronizer)
OnSourcePoseChanged(SourcePoseEventData<Vector3>)

Raised when the source position is changed.

(Inherited from ControllerPoseSynchronizer)
OnTeleportCanceled(TeleportEventData)

Raised when a teleport request has been canceled.

OnTeleportCompleted(TeleportEventData)

Raised when a teleport has successfully completed.

OnTeleportRequest(TeleportEventData)

Raised when a pointer requests a teleport target, but no teleport has begun.

OnTeleportStarted(TeleportEventData)

Raised when a teleport has started.

PostUpdateLineRenderers() (Inherited from LinePointer)
PreUpdateLineRenderers() (Inherited from LinePointer)
RegisterHandlers()

Overload this method to specify, which global events component wants to listen to. Use RegisterHandler API of InputSystem

(Inherited from ControllerPoseSynchronizer)
Reset()
SetCursor(GameObject)

Set a new cursor for this IMixedRealityPointer

(Inherited from BaseControllerPointer)
SetLinePoints(Vector3, Vector3) (Inherited from LinePointer)
SourcePoseDataUsable<T>(SourcePoseEventData<T>)

Helper function used to determine whether or not the controller pose synchronizer is configured to make use of the SourcePoseEventData

(Inherited from ControllerPoseSynchronizer)
Start()
UnregisterHandlers()

Overload this method to specify, which global events component should stop listening to. Use UnregisterHandler API of InputSystem

(Inherited from ControllerPoseSynchronizer)
UpdateRays() (Inherited from CurvePointer)

Explicit Interface Implementations

IEqualityComparer.Equals(Object, Object) (Inherited from BaseControllerPointer)
IEqualityComparer.GetHashCode(Object) (Inherited from BaseControllerPointer)

Applies to