SpatialMouseInteractor Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An extension of XRRayInteractor which has extra functionality for handling spatial mouse movement and scrolling.
[UnityEngine.AddComponentMenu("Scripts/Microsoft/MRTK/Input/MRTK Spatial Mouse Interactor")]
public class SpatialMouseInteractor : UnityEngine.XR.Interaction.Toolkit.XRRayInteractor, MixedReality.Toolkit.IRayInteractor
[<UnityEngine.AddComponentMenu("Scripts/Microsoft/MRTK/Input/MRTK Spatial Mouse Interactor")>]
type SpatialMouseInteractor = class
inherit XRRayInteractor
interface IRayInteractor
interface IXRInteractor
Public Class SpatialMouseInteractor
Inherits XRRayInteractor
Implements IRayInteractor
- Inheritance
-
UnityEngine.XR.Interaction.Toolkit.XRRayInteractorSpatialMouseInteractor
- Attributes
-
UnityEngine.AddComponentMenuAttribute
- Implements
-
IRayInteractor UnityEngine.XR.Interaction.Toolkit.IXRInteractor
Remarks
This is an experimental feature. This class is early in the cycle, it has been labeled as experimental to indicate that it is still evolving, and subject to change over time. Parts of the MRTK, such as this class, appear to have a lot of value even if the details haven't fully been fleshed out. For these types of features, we want the community to see them and get value out of them early enough so to provide feedback.
Constructors
| Name | Description |
|---|---|
| SpatialMouseInteractor() | |
Fields
| Name | Description |
|---|---|
| mouseMoveAction |
The Input System action used for mouse movement. Must be a Vector2 Control. |
| mouseScrollAction |
The Input System action used for mouse scrolling. Must be a Vector2 Control. |
Properties
| Name | Description |
|---|---|
| IsInUse |
Returns true if mouse is actively in use. Should be used to show/hide mouse-specific feedback (e.g. cursor). |
Methods
| Name | Description |
|---|---|
| CanHover(IXRHoverInteractable) | UnityEngine.XR.Interaction.Toolkit.XRRayInteractor.CanHover(UnityEngine.XR.Interaction.Toolkit.IXRHoverInteractable) |
| CanSelect(IXRSelectInteractable) | UnityEngine.XR.Interaction.Toolkit.XRRayInteractor.CanSelect(UnityEngine.XR.Interaction.Toolkit.IXRSelectInteractable) |
| GetValidTargets(List<IXRInteractable>) | UnityEngine.XR.Interaction.Toolkit.IXRInteractor.GetValidTargets(System.Collections.Generic.List{UnityEngine.XR.Interaction.Toolkit.IXRInteractable}) |
| OnDisable() |
A Unity event function that is called when the script component has been disabled. |
| OnEnable() |
A Unity event function that is called when the script component has been enabled. |