Class ManipulationHandler
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.
Inheritance
ManipulationHandler
Implements
IMixedRealityPointerHandler
IMixedRealityFocusChangedHandler
Assembly: cs.temp.dll.dll
public class ManipulationHandler : MonoBehaviour, IMixedRealityPointerHandler, IMixedRealityFocusChangedHandler
Fields
Declaration
public ManipulationEvent OnHoverEntered
Field Value
Declaration
public ManipulationEvent OnHoverExited
Field Value
Declaration
public ManipulationEvent OnManipulationEnded
Field Value
Declaration
public ManipulationEvent OnManipulationStarted
Field Value
Properties
Declaration
public bool AllowFarManipulation { get; set; }
Property Value
Declaration
public MovementConstraintType ConstraintOnMovement { get; set; }
Property Value
Type |
Description |
MovementConstraintType |
|
Declaration
public RotationConstraintType ConstraintOnRotation { get; set; }
Property Value
Type |
Description |
RotationConstraintType |
|
Declaration
public Transform HostTransform { get; set; }
Property Value
Type |
Description |
Transform |
|
Declaration
public ManipulationHandler.HandMovementType ManipulationType { get; set; }
Property Value
Declaration
public ManipulationHandler.RotateInOneHandType OneHandRotationModeFar { get; set; }
Property Value
Declaration
public ManipulationHandler.RotateInOneHandType OneHandRotationModeNear { get; set; }
Property Value
Declaration
public ManipulationHandler.ReleaseBehaviorType ReleaseBehavior { get; set; }
Property Value
Declaration
public bool SmoothingActive { get; set; }
Property Value
Declaration
public float SmoothingAmoutOneHandManip { get; set; }
Property Value
Declaration
public ManipulationHandler.TwoHandedManipulation TwoHandedManipulationType { get; set; }
Property Value
Methods
Releases the object that is currently manipulated
Declaration
public void ForceEndManipulation()
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.
Declaration
public Vector3 GetPointerGrabPoint(uint pointerId)
Parameters
Type |
Name |
Description |
UInt32 |
pointerId |
|
Returns
Declaration
public void OnBeforeFocusChange(FocusEventData eventData)
Parameters
Type |
Name |
Description |
FocusEventData |
eventData |
|
Declaration
public void OnFocusChanged(FocusEventData eventData)
Parameters
Type |
Name |
Description |
FocusEventData |
eventData |
|
Declaration
public void OnPointerClicked(MixedRealityPointerEventData eventData)
Parameters
Type |
Name |
Description |
MixedRealityPointerEventData |
eventData |
|
Declaration
public void OnPointerDown(MixedRealityPointerEventData eventData)
Parameters
Type |
Name |
Description |
MixedRealityPointerEventData |
eventData |
|
Declaration
public void OnPointerDragged(MixedRealityPointerEventData eventData)
Parameters
Type |
Name |
Description |
MixedRealityPointerEventData |
eventData |
|
Declaration
public void OnPointerUp(MixedRealityPointerEventData eventData)
Parameters
Type |
Name |
Description |
MixedRealityPointerEventData |
eventData |
|
Implements
IMixedRealityPointerHandler
IMixedRealityFocusChangedHandler