releases/2.5.4releases/2.0.0releases/2.1.0releases/2.2.0releases/2.3.0releases/2.4.0releases/2.5.0releases/2.5.1releases/2.5.2releases/2.5.3
  • Features and Architecture
  • API Documentation

We've moved!

Starting from MRTK 2.6, we are publishing both conceptual docs and API references on docs.microsoft.com. For conceptual docs, please visit our new landing page. For API references, please visit the MRTK-Unity section of the dot net API explorer. Existing content will remain here but will not be updated further.

  • Features and Architecture
  • Feature Overviews
  • UX Building Blocks
  • Object Manipulator
Search Results for

    Show / Hide Table of Contents
    • Welcome to MRTK
      • Installation Guide
      • Configuration
        • Using the Unity Package Manager
        • MRTK configuration dialog
        • Getting started with MRTK and XR SDK
      • Updates and Deployment
        • Updating from earlier versions
        • Upgrading from HTK
        • Building and Deploying MRTK
      • Packages and Release Notes
        • Release Notes
        • MRTK Packages
      • Performance and Best Practices
        • Performance
        • Hologram Stabilization
        • Using MRTK in large projects
    • Architecture
      • Overview
      • Framework and Runtime
      • Input System
        • Terminology
        • Core System
        • Controllers, Pointers, and Focus
      • Systems, Extension Services and Data Providers
    • Feature Overviews
      • Boundary System
        • Boundary System Overview
        • Configuring the Boundary Visualization
      • Camera System
        • Camera System Overview
        • Camera Settings Providers
          • Windows Mixed Reality Camera Settings
          • Unity AR Camera Settings [Experimental]
          • Creating a camera settings provider
      • Cross Platform Support
        • Configure MRTK for iOS and Android
        • Configure MRTK for Leap Motion Hand Tracking
        • Configure MRTK for Oculus Quest
      • Detecting Platform Capabilities
      • Diagnostics System
        • Diagnostics System Overview
        • Configuring the Diagnostics System
        • Using the Visual Profiler
      • Extension Services
        • Extension Service Creation Wizard
        • Scene Transition Service Overview
        • Hand Physics Service Overview
      • Input System
        • Input Overview
        • Input Actions
        • Input Events
        • Input Providers
          • Input Providers Overview
          • Creating an input data provider
        • Controllers
        • Eyes
          • Overview
          • Getting Started
          • Access Data via Code
          • Validate Tracking Calibration
        • Gaze
        • Gestures
        • Hands
        • How to Add Near Interaction
        • In-Editor Input Simulation
        • Pointers
        • Voice Input
          • Dictation
          • Speech (Command and Control)
      • Multi Scene System
        • Multi Scene System Overview
        • Scene Types
        • Content Scene Loading
        • Monitoring Content Loading
        • Lighting Scene Operations
      • Packaging
        • MRTK Packages
        • MRTK Modularization
      • Profiles
        • Profiles Overview
        • Configuration Guide
      • Rendering
        • MRTK Standard Shader
        • Material Instance Overview
        • Hover Light Overview
        • Proximity Light Overview
        • Clipping Primitive Overview
      • Services
        • What makes a mixed reality feature
        • What are the MixedRealityServiceRegistry and IMixedRealityServiceRegistrar
        • Extension services
      • Spatial Awareness System
        • Spatial Awareness Overview
        • Spatial Observers
          • Configuring Observers for Device
          • Configuring Observers for Editor
          • Controlling Observers via Code
          • Creating a custom Observer
      • Teleport System Overview
      • Tools
        • Dependency Window
        • Extension Service Creation Wizard
        • Holographic Remoting
        • Input Animation Recording
          • Input Animation File Format Specification
        • Migration Window
        • Optimize Window
        • Runtime tools
          • Controller Mapping tool
          • InputFeatureUsage tool
          • MixedRealityInteractionMapping tool
      • UX Building Blocks
        • Toolbox Window
        • Button
        • Bounds Control
        • Object Manipulator
        • Constraint Manager
        • Slate
        • System Keyboard
        • Interactable
        • Interactive Element
        • Solvers
          • Tap to Place
        • Object Collection
        • Scrolling Object Collection
        • Tooltips
        • Slider
        • Hand Menu
        • Near Menu
        • App Bar
        • Rigged Hand Visualizer
        • Fingertip Visualization
        • Progress Indicator
        • Dialog
        • Hand Coach
        • Pulse Shader
        • Dock Control [Experimental]
        • HoloLens Keyboard Helpers [Experimental]
        • Elastic System [Experimental]
        • Bounding Box [Obsolete]
        • Manipulation Handler [Obsolete]
      • Example Scenes
        • Examples Hub
        • Hand Interaction Example
        • Eye Tracking Interaction Example
    • Contributing
      • Contributing Overview
      • Coding Guidelines
      • Writing and Running Tests
      • Writing Documentation
      • Pull Requests
      • Experimental Features
      • Breaking Changes
      • How to use DocFX
    • Planning
      • Roadmap
    • Notice
    • Authors

    Object manipulator

    Object manipulator

    The ObjectManipulator is the new component for manipulation behaviour, previously found in ManipulationHandler. The object manipulator makes a number of improvements and simplifications. This component is a replacement for the manipulation handler, which will be deprecated.

    The ObjectManipulator script makes an object movable, scalable, and rotatable using one or two hands. The object manipulator can be configured to control how the object will respond to various inputs. The script should work with most forms of interaction, such as HoloLens 2 articulated hand, HoloLens 2 hand rays, HoloLens 1 gaze and gestures and immersive headset motion controller input.

    How to use the object manipulator

    To use the object manipulator, first add the ObjectManipulator script component to a GameObject. Make sure to also add a collider to the object, matching its grabbable bounds.

    To make the object respond to near articulated hand input, add the NearInteractionGrabbable script as well.

    Physics behaviour can be enabled for the object manipulator by adding a rigidbody component to the object. Physics behaviour enabled by adding this component is discussed in greater detail in Physics and collisions.

    As well as this, manipulation can be constrained by adding manipulation constraint components to the object. These are special components that work with manipulation and change the manipulation behaviour in some way.

    Manipulation Handler

    Inspector properties and fields

    General properties

    Host transform

    The object transform that will be manipulated. Defaults to the object of the component.

    Manipulation type

    Specifies whether the object can be manipulated using one hand or two hands. Because this property is a flag, both options can be selected.

    • One handed: Enables one handed manipulation if selected.
    • Two handed: Enables two handed manipulation if selected.

    Allow far manipulation

    Specifies whether manipulation can be done using far interaction with pointers.

    One handed manipulation properties

    One hand rotation mode near

    Specifies how the object will behave when it is being grabbed with one hand near. These options only work for articulated hands.

    • Rotate about object center: Object rotates using rotation of the hand, but about the object center point. The object will appear to move less as it rotates, but there may be a feeling of disconnection between the hand and the object. More useful for far interaction.
    • Rotate about grab point: Rotate object with the hand about the grab point between the thumb and index finger. It should feel as if the object is being held by the hand.

    One hand rotation mode far

    Specifies how the object will behave when it is being grabbed with one hand at distance. These options only work for articulated hands.

    • Rotate about object center: Rotate object using rotation of the hand, but about the object center point. Useful for inspecting at a distance without the object center moving as the object rotates.
    • Rotate about grab point: Rotate object using rotation of the hand, but about the pointer ray hit point. Useful for inspection.

    Two handed manipulation properties

    Two handed manipulation type

    Specifies how two hand manipulation can transform an object. Because this property is a flag, any number of options can be selected.

    • Move: Moving is allowed if selected.
    • Scale: Scaling is allowed if selected.
    • Rotate: Rotation is allowed if selected.

    Manipulation Handler

    Constraints

    Enable constraints

    This setting will enable the linked constraint manager. Transform changes will be processed by constraints registered to the selected constraint manager.

    Constraint manager

    The dropdown allows to select any of the attached constraint managers. Object manipulator ensures there's a constraint manager attached at all times. Note that multiple components of the same type will show up under the same name in unity. To make it easier to distinguish between multiple constraint managers on the same object, the available options will show a hint on the configuration of the selected constraint manager (manual or auto constraint selection).

    Go to component

    The constraint manager selection comes with a Go to component button. This button will cause the inspector to scroll to the selected component so that it can be configured.

    Physics

    Settings in this section appear only when the object has a RigidBody component.

    Release behavior

    Specify which physical properties a manipulated object should keep upon release. Because this property is a flag, both options can be selected.

    • Keep Velocity: When the object is released, if this option is selected it will keep its linear velocity.
    • Keep Angular Velocity: When the object is released, if this option is selected it will keep its angular velocity.

    Use forces for near manipulation

    Whether physics forces are used to move the object when performing near manipulations. Setting this to false will make the object feel more directly connected to the users hand. Setting this to true will honor the mass and inertia of the object, but may feel as though the object is connected through a spring. The default is false.

    Smoothing

    Smoothing far

    Whether frame-rate independent smoothing is enabled for far interactions. Far smoothing is enabled by default.

    Smoothing near

    Whether frame-rate independent smoothing is enabled for near interactions. Near smoothing is disabled by default because the effect may be perceived as being 'disconnected' from the hand.

    Smoothing active

    Obsolete and will be removed in a future version. Applications should use SmoothingFar, SmoothingNear or a combination of the two.

    Move lerp time

    Amount of smoothing to apply to the movement. Smoothing of 0 means no smoothing. Max value means no change to value.

    Rotate lerp time

    Amount of smoothing to apply to the rotation. Smoothing of 0 means no smoothing. Max value means no change to value.

    Scale lerp time

    Amount of smoothing to apply to the scale. Smoothing of 0 means no smoothing. Max value means no change to value.

    Manipulation events

    Manipulation handler provides the following events:

    • OnManipulationStarted: Fired when manipulation starts.
    • OnManipulationEnded: Fires when the manipulation ends.
    • OnHoverStarted: Fires when a hand / controller hovers the manipulatable, near or far.
    • OnHoverEnded: Fires when a hand / controller un-hovers the manipulatable, near or far.

    The event fire order for manipulation is:

    OnHoverStarted -> OnManipulationStarted -> OnManipulationEnded -> OnHoverEnded

    If there is no manipulation, you will still get hover events with the following fire order:

    OnHoverStarted -> OnHoverEnded

    Physics and collisions

    Physics behaviour can be enabled by adding a rigidbody component to the same object as an object manipulator. Not only does this enable configuration of release behaviour above, it also enables collisions. Without a rigidbody component, collisions don't behave correctly during manipulation:

    • Collisions between a manipulated object and a static collider (i.e. an object with a collider but no rigidbody) do not work, the manipulated object passes straight through the static collider unaffected.
    • Collisions between a manipulated object and a rigidbody (i.e an object with both a collider and a rigidbody) cause the rigidbody to have a collision response, but the response is jumpy and unnatural. There is also no collision response on the manipulated object.

    When a rigidbody is added, collisions should work correctly.

    Without rigidbody

    With rigidbody

    Elastics (Experimental)

    Elastics can be used when manipulating objects via object manipulator. Note that the elastics system is still in experimental state. To enable elastics either link an existing elastics manager component or create and link a new elastics manager via the Add Elastics Manager button.

    See also

    • Bounds control
    • Constraint manager
    • Migration window
    • Elastics system (Experimental)
    • Improve this Doc
    In This Article
    • How to use the object manipulator
    • Inspector properties and fields
      • General properties
        • Host transform
        • Manipulation type
        • Allow far manipulation
      • One handed manipulation properties
        • One hand rotation mode near
        • One hand rotation mode far
      • Two handed manipulation properties
        • Two handed manipulation type
      • Constraints
        • Enable constraints
        • Constraint manager
        • Go to component
      • Physics
        • Release behavior
        • Use forces for near manipulation
      • Smoothing
        • Smoothing far
        • Smoothing near
        • Smoothing active
        • Move lerp time
        • Rotate lerp time
        • Scale lerp time
      • Manipulation events
    • Physics and collisions
      • Without rigidbody
      • With rigidbody
    • Elastics (Experimental)
    • See also
    Back to top Generated by DocFX