Class HandConstraintPalmUp
Augments the HandConstraint to also check if the palm is facing the user before activation. This solver only works with IMixedRealityHand controllers, with other IMixedRealityController types this solver will behave just like its base class.
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Utilities.Solvers
Assembly: cs.temp.dll.dll
Syntax
public class HandConstraintPalmUp : HandConstraint
Properties
EyeGazeProximityThreshold
The distance threshold calculated between the planar intersection of the eye gaze ray and the activation transform. Uses square magnitude between two points for distance
Declaration
public float EyeGazeProximityThreshold { get; set; }
Property Value
Type | Description |
---|---|
Single |
FacingCameraTrackingThreshold
The angle (in degrees) of the cone between the palm's up and camera's forward have to match. Only supported by IMixedRealityHand controllers.
Declaration
public float FacingCameraTrackingThreshold { get; set; }
Property Value
Type | Description |
---|---|
Single |
FacingThreshold
Declaration
[Obsolete("Use FacingCameraTrackingThreshold property instead")]
public float FacingThreshold { get; set; }
Property Value
Type | Description |
---|---|
Single |
FlatHandThreshold
The angle (in degrees) of the cone between the palm's up and triangle's normal formed from the palm, to index, to ring finger tip have to match. Only supported by IMixedRealityHand controllers.
Declaration
public float FlatHandThreshold { get; set; }
Property Value
Type | Description |
---|---|
Single |
FollowHandCameraFacingThresholdAngle
Angle (in degrees) between hand up and camera forward, below which the hand menu follows the gaze, if followHandUntilFacingCamera is active.
Declaration
public float FollowHandCameraFacingThresholdAngle { get; set; }
Property Value
Type | Description |
---|---|
Single |
FollowHandUntilFacingCamera
With this active, solver will follow hand rotation until the menu is sufficiently aligned with the gaze, at which point it faces the camera.
Declaration
public bool FollowHandUntilFacingCamera { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
HeadGazeProximityThreshold
The distance threshold calculated between the planar intersection of the head gaze ray and the activation transform. Uses square magnitude between two points for distance This is used if eye gaze isn't available for the user
Declaration
public float HeadGazeProximityThreshold { get; set; }
Property Value
Type | Description |
---|---|
Single |
RequireFlatHand
Do the fingers on the hand need to be straightened, rather than curled, to form a flat hand shape. Only supported by IMixedRealityHand controllers.
Declaration
public bool RequireFlatHand { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
UseGazeActivation
With this active, solver will activate after the palm threshold has been met and the user gazes at the activation point. If eye gaze information is not available, the head gaze will be used.
Declaration
public bool UseGazeActivation { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
IsValidController(IMixedRealityController)
Determines if a controller meets the requirements for use with constraining the tracked object and determines if the palm is currently facing the user. This function will modify the position and rotation behavior of the hand constraint if the followHandUntilFacingCamera variable is enabled.
Declaration
protected override bool IsValidController(IMixedRealityController controller)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityController | controller | The hand to check against. |
Returns
Type | Description |
---|---|
Boolean | True if this hand should be used for tracking. |
Overrides
OnEnable()
When enabled, ensure that there are no outlying status changes that would prevent HandConstraintPalmUp from properly working (like gazeActivationAlreadyTriggered being set to true previously)
Declaration
protected override void OnEnable()
Overrides
StartWorldLockReattachCheckCoroutine()
Coroutine function called by the ManipulationHandler of the attached object whenever the object is done being manipulated by the user. This triggers a coroutine that checks to see whether the object should reattach to the hand.
Declaration
public void StartWorldLockReattachCheckCoroutine()