Show / Hide Table of Contents

    Class CursorModifier

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

    Inheritance
    Object
    CursorModifier
    Implements
    ICursorModifier
    IMixedRealityFocusChangedHandler
    IEventSystemHandler
    Namespace: Microsoft.MixedReality.Toolkit.Input
    Assembly: cs.temp.dll.dll
    Syntax
    public class CursorModifier : MonoBehaviour, ICursorModifier, IMixedRealityFocusChangedHandler, IEventSystemHandler

    Properties

    CursorNormalOffset

    Direction of the IMixedRealityCursor offset.

    Declaration
    public Vector3 CursorNormalOffset { get; set; }
    Property Value
    Type Description
    Vector3

    CursorParameters

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

    Declaration
    public AnimatorParameter[] CursorParameters { get; }
    Property Value
    Type Description
    AnimatorParameter[]

    CursorPositionOffset

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

    Declaration
    public Vector3 CursorPositionOffset { get; set; }
    Property Value
    Type Description
    Vector3

    CursorScaleOffset

    Scale of the IMixedRealityCursor when looking at this GameObject.

    Declaration
    public Vector3 CursorScaleOffset { get; set; }
    Property Value
    Type Description
    Vector3

    HideCursorOnFocus

    Should the IMixedRealityCursor be hidden when this GameObject is focused?

    Declaration
    public bool HideCursorOnFocus { get; set; }
    Property Value
    Type Description
    Boolean

    HostTransform

    Transform for which this IMixedRealityCursor modifies applies its various properties.

    Declaration
    public Transform HostTransform { get; set; }
    Property Value
    Type Description
    Transform

    SnapCursorPosition

    Should the IMixedRealityCursor snap to the GameObject's position?

    Declaration
    public bool SnapCursorPosition { get; set; }
    Property Value
    Type Description
    Boolean

    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.

    Declaration
    public bool UseGazeBasedNormal { get; set; }
    Property Value
    Type Description
    Boolean

    Methods

    GetCursorVisibility()

    Indicates whether the IMixedRealityCursor should be visible or not.

    Declaration
    public bool GetCursorVisibility()
    Returns
    Type Description
    Boolean

    True if IMixedRealityCursor should be visible, false if not.

    GetModifiedPosition(IMixedRealityCursor)

    Declaration
    public Vector3 GetModifiedPosition(IMixedRealityCursor cursor)
    Parameters
    Type Name Description
    IMixedRealityCursor cursor
    Returns
    Type Description
    Vector3

    GetModifiedRotation(IMixedRealityCursor)

    Returns the IMixedRealityCursor rotation after considering this modifier.

    Declaration
    public Quaternion GetModifiedRotation(IMixedRealityCursor cursor)
    Parameters
    Type Name Description
    IMixedRealityCursor cursor

    IMixedRealityCursor that is being modified.

    Returns
    Type Description
    Quaternion

    New rotation for the IMixedRealityCursor

    GetModifiedScale(IMixedRealityCursor)

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

    Declaration
    public Vector3 GetModifiedScale(IMixedRealityCursor cursor)
    Parameters
    Type Name Description
    IMixedRealityCursor cursor

    IMixedRealityCursor that is being modified.

    Returns
    Type Description
    Vector3

    New local scale for the IMixedRealityCursor

    GetModifiedTransform(IMixedRealityCursor, out Vector3, out Quaternion, out Vector3)

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

    Declaration
    public void GetModifiedTransform(IMixedRealityCursor cursor, out Vector3 position, out Quaternion rotation, out Vector3 scale)
    Parameters
    Type Name Description
    IMixedRealityCursor cursor

    Cursor that is being modified.

    Vector3 position

    Modified position.

    Quaternion rotation

    Modified rotation.

    Vector3 scale

    Modified scale.

    Explicit Interface Implementations

    IMixedRealityFocusChangedHandler.OnBeforeFocusChange(FocusEventData)

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

    Declaration
    void IMixedRealityFocusChangedHandler.OnBeforeFocusChange(FocusEventData eventData)
    Parameters
    Type Name Description
    FocusEventData eventData
    Remarks

    Useful for logic that needs to take place before focus changes.

    IMixedRealityFocusChangedHandler.OnFocusChanged(FocusEventData)

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

    Declaration
    void IMixedRealityFocusChangedHandler.OnFocusChanged(FocusEventData eventData)
    Parameters
    Type Name Description
    FocusEventData eventData

    Implements

    ICursorModifier
    IMixedRealityFocusChangedHandler
    IEventSystemHandler
    Back to top Generated by DocFX