Edit

Share via


CursorModifier Class

Definition

Component that can be added to any GameObject with a Collider to modify the IMixedRealityCursor reacts when focused by a IMixedRealityPointer.

public ref class CursorModifier : UnityEngine::MonoBehaviour, Microsoft::MixedReality::Toolkit::Input::ICursorModifier, UnityEngine::EventSystems::IEventSystemHandler
[UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/CursorModifier")]
public class CursorModifier : UnityEngine.MonoBehaviour, Microsoft.MixedReality.Toolkit.Input.ICursorModifier, UnityEngine.EventSystems.IEventSystemHandler
[<UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/CursorModifier")>]
type CursorModifier = class
    inherit MonoBehaviour
    interface ICursorModifier
    interface IMixedRealityFocusChangedHandler
    interface IEventSystemHandler
Public Class CursorModifier
Inherits MonoBehaviour
Implements ICursorModifier, IEventSystemHandler
Inheritance
UnityEngine.MonoBehaviour
CursorModifier
Attributes
UnityEngine.AddComponentMenuAttribute
Implements
ICursorModifier IMixedRealityFocusChangedHandler UnityEngine.EventSystems.IEventSystemHandler

Constructors

CursorModifier()

Properties

CursorNormalOffset

Direction of the IMixedRealityCursor offset.

CursorParameters

IMixedRealityCursor animation parameters to set when this GameObject is focused. Leave empty for none.

CursorPositionOffset

How much a IMixedRealityCursor's position should be offset from the surface of the GameObject when overlapping.

CursorScaleOffset

Scale of the IMixedRealityCursor when looking at this GameObject.

HideCursorOnFocus

Should the IMixedRealityCursor be hidden when this GameObject is focused?

HostTransform

Transform for which this IMixedRealityCursor modifies applies its various properties.

SnapCursorPosition

Should the IMixedRealityCursor snap to the GameObject's position?

UseGazeBasedNormal

If true, the normal from the pointing vector will be used to orient the IMixedRealityCursor instead of the targeted GameObject's normal at point of contact.

Methods

GetCursorVisibility()

Indicates whether the IMixedRealityCursor should be visible or not.

GetModifiedPosition(IMixedRealityCursor)
GetModifiedRotation(IMixedRealityCursor)

Returns the IMixedRealityCursor rotation after considering this modifier.

GetModifiedScale(IMixedRealityCursor)

Returns the IMixedRealityCursor's local scale after considering this modifier.

GetModifiedTransform(IMixedRealityCursor, Vector3, Quaternion, Vector3)

Returns the modified Transform for the IMixedRealityCursor after considering this modifier.

Explicit Interface Implementations

IMixedRealityFocusChangedHandler.OnBeforeFocusChange(FocusEventData)

Focus event that is raised before the focus is actually changed.

IMixedRealityFocusChangedHandler.OnFocusChanged(FocusEventData)

Focus event that is raised when the focused object is changed.

Applies to