Modifica

Condividi tramite


ManipulationHandler Class

Definition

This script allows for an object to be movable, scalable, and rotatable with one or two hands. You may also configure the script on only enable certain manipulations. The script works with both HoloLens' gesture input and immersive headset's motion controller input.

public ref class ManipulationHandler : UnityEngine::MonoBehaviour, Microsoft::MixedReality::Toolkit::Input::IMixedRealityFocusChangedHandler, Microsoft::MixedReality::Toolkit::Input::IMixedRealityPointerHandler, UnityEngine::EventSystems::IEventSystemHandler
[UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/ManipulationHandler")]
[UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/manipulation-handler")]
public class ManipulationHandler : UnityEngine.MonoBehaviour, Microsoft.MixedReality.Toolkit.Input.IMixedRealityFocusChangedHandler, Microsoft.MixedReality.Toolkit.Input.IMixedRealityPointerHandler, UnityEngine.EventSystems.IEventSystemHandler
[<UnityEngine.AddComponentMenu("Scripts/MRTK/SDK/ManipulationHandler")>]
[<UnityEngine.HelpURL("https://docs.microsoft.com/windows/mixed-reality/mrtk-unity/features/ux-building-blocks/manipulation-handler")>]
type ManipulationHandler = class
    inherit MonoBehaviour
    interface IMixedRealityPointerHandler
    interface IEventSystemHandler
    interface IMixedRealityFocusChangedHandler
Public Class ManipulationHandler
Inherits MonoBehaviour
Implements IEventSystemHandler, IMixedRealityFocusChangedHandler, IMixedRealityPointerHandler
Inheritance
UnityEngine.MonoBehaviour
ManipulationHandler
Attributes
UnityEngine.AddComponentMenuAttribute UnityEngine.HelpURLAttribute
Implements
IMixedRealityFocusChangedHandler IMixedRealityPointerHandler UnityEngine.EventSystems.IEventSystemHandler

Constructors

ManipulationHandler()

Properties

AllowFarManipulation
ConstraintOnMovement
ConstraintOnRotation
HostTransform
ManipulationType
OneHandRotationModeFar
OneHandRotationModeNear
OnHoverEntered
OnHoverExited
OnManipulationEnded
OnManipulationStarted
ReleaseBehavior
SmoothingActive
SmoothingAmoutOneHandManip
TwoHandedManipulationType
UseLocalSpaceForConstraint

Gets or sets whether the constraints should be applied in local space of the object being manipulated or world space.

Methods

ForceEndManipulation()

Releases the object that is currently manipulated

GetPointerGrabPoint(UInt32)

Gets the grab point for the given pointer id. Only use if you know that your given pointer id corresponds to a pointer that has grabbed this component.

OnBeforeFocusChange(FocusEventData)
OnFocusChanged(FocusEventData)
OnPointerClicked(MixedRealityPointerEventData)

When a pointer clicked event is raised, this method is used to pass along the event data to the input handler.

OnPointerDown(MixedRealityPointerEventData)

When a pointer down event is raised, this method is used to pass along the event data to the input handler.

OnPointerDragged(MixedRealityPointerEventData)
OnPointerUp(MixedRealityPointerEventData)

When a pointer up event is raised, this method is used to pass along the event data to the input handler.

Applies to