HandConstraintPalmUp 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.
Augments the HandConstraint to also check if the palm is facing the user before activation. This solver only works with articulated hands, with other controller types this solver will behave the same as HandConstraint.
[UnityEngine.AddComponentMenu("MRTK/Spatial Manipulation/Solvers/Hand Constraint (Palm Up)")]
public class HandConstraintPalmUp : MixedReality.Toolkit.SpatialManipulation.HandConstraint
[<UnityEngine.AddComponentMenu("MRTK/Spatial Manipulation/Solvers/Hand Constraint (Palm Up)")>]
type HandConstraintPalmUp = class
inherit HandConstraint
Public Class HandConstraintPalmUp
Inherits HandConstraint
- Inheritance
- Attributes
-
UnityEngine.AddComponentMenuAttribute
Constructors
| Name | Description |
|---|---|
| HandConstraintPalmUp() | |
Fields
| Name | Description |
|---|---|
| SolverHandler |
The handler reference for this solver that's attached to this GameObject (Inherited from Solver) |
Properties
| Name | Description |
|---|---|
| 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 |
| FacingCameraTrackingThreshold |
The angle (in degrees) of the cone between the palm's up and camera's forward have to match. |
| 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. |
| FollowHandCameraFacingThresholdAngle |
Angle (in degrees) between hand up and camera forward, below which the hand menu follows the gaze, if followHandUntilFacingCamera is active. |
| 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. |
| ForwardOffset |
Additional offset to apply towards the user. (Inherited from HandConstraint) |
| GoalPosition |
The final position to be attained (Inherited from Solver) |
| GoalRotation |
The final rotation to be attained (Inherited from Solver) |
| GoalScale |
The final scale to be attained (Inherited from Solver) |
| HandBounds |
Get the HandBounds component this is using to apply the hand constraints. (Inherited from HandConstraint) |
| Handedness |
Get the Handedness value from the used input device. (Inherited from HandConstraint) |
| 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 |
| HideHandCursorsOnActivate |
When a hand is activated for tracking, should the cursor(s) be disabled on that hand? (Inherited from HandConstraint) |
| MoveLerpTime |
If 0, the position will update immediately. Otherwise, the greater this attribute the slower the position updates (Inherited from Solver) |
| OffsetBehavior |
Specifies how the solver's offset relative to the hand will be computed. (Inherited from HandConstraint) |
| OnFirstHandDetected |
Event which is triggered when zero hands to one hand is tracked. (Inherited from HandConstraint) |
| OnHandActivate |
Event which is triggered when a hand begins being tracked. (Inherited from HandConstraint) |
| OnHandDeactivate |
Event which is triggered when a hand stops being tracked. (Inherited from HandConstraint) |
| OnLastHandLost |
Event which is triggered when all hands are lost. (Inherited from HandConstraint) |
| RequireFlatHand |
Do the fingers on the hand need to be straightened, rather than curled, to form a flat hand shape. |
| RotateLerpTime |
If 0, the rotation will update immediately. Otherwise, the greater this attribute the slower the rotation updates")] (Inherited from Solver) |
| RotationBehavior |
Specifies how the solver should rotate when tracking the hand. (Inherited from HandConstraint) |
| SafeZone |
Which part of the hand to move the tracked object towards. The ulnar side of the hand is recommended for most situations. (Inherited from HandConstraint) |
| SafeZoneAngleOffset |
Additional degree offset to apply clockwise from the stated SafeZone. Direction is clockwise on the left hand and anti-clockwise on the right hand. (Inherited from HandConstraint) |
| SafeZoneBuffer |
Additional offset to apply to the intersection point with the hand bounds. (Inherited from HandConstraint) |
| ScaleLerpTime |
If 0, the scale will update immediately. Otherwise, the greater this attribute the slower the scale updates (Inherited from Solver) |
| Smoothing |
If true, updates are smoothed to the target. Otherwise, they are snapped to the target (Inherited from Solver) |
| UpdateLinkedTransform |
If true, the position and orientation will be calculated, but not applied, for other components to use (Inherited from Solver) |
| UpdateWhenOppositeHandNear |
Should the solver continue to move when the opposite hand (hand which is not being tracked) is near the tracked hand. This can improve stability when one hand occludes the other." (Inherited from HandConstraint) |
| 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. |
| WorkingPosition |
Automatically uses the shared position if the solver is set to use the 'linked transform'. UpdateLinkedTransform may be set to false, and a solver will automatically update the object directly, and not inherit work done by other solvers to the shared position (Inherited from Solver) |
| WorkingRotation |
Rotation version of WorkingPosition (Inherited from Solver) |
| WorkingScale |
Scale version of WorkingPosition (Inherited from Solver) |
Methods
| Name | Description |
|---|---|
| AddOffset(Vector3) |
Add an offset position to the target goal position. (Inherited from Solver) |
| Awake() |
A Unity event function that is called when an enabled script instance is being loaded. (Inherited from Solver) |
| CalculateGoalPosition() |
Performs a ray vs AABB test to determine where the solver can constrain the tracked object without intersection. The "safe zone" is calculated as if projected into the horizontal and vertical plane of the camera. (Inherited from HandConstraint) |
| CalculateGoalRotation() |
Determines the solver's goal rotation based off of the SolverRotationBehavior. (Inherited from HandConstraint) |
| GetControllerNode(Handedness) |
Returns the XRNode that matches the desired handedness. (Inherited from HandConstraint) |
| IsOppositeHandNear(Nullable<XRNode>) |
Performs an intersection test to see if the left hand is near the right hand or vice versa. (Inherited from HandConstraint) |
| IsValidController(Nullable<XRNode>) |
Determines if a hand meets the requirements for use with constraining the tracked object and determines if the palm is currently facing the user. |
| OnDisable() |
A Unity event function that is called when the script component has been disabled. (Inherited from Solver) |
| OnEnable() |
A Unity event function that is called when the script component has been enabled. |
| SnapGoalTo(Vector3, Quaternion, Vector3) |
SnapGoalTo only sets the goal orientation. Not really useful. (Inherited from Solver) |
| SnapTo(Vector3, Quaternion, Vector3) |
Snaps the solver to the desired pose. (Inherited from Solver) |
| SolverUpdate() |
Should be implemented in derived classes, but Solver can be used to flush shared transform to real transform (Inherited from HandConstraint) |
| SolverUpdateEntry() |
Tracks lifetime of the solver, disabling it when expired, and finally runs the orientation update logic (Inherited from Solver) |
| Start() |
A Unity event function that is called on the frame when a script is enabled just before any of the update methods are called the first time. (Inherited from Solver) |
| StartWorldLockReattachCheckCoroutine() |
Coroutine function called by the ObjectManipulator 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. |
| UpdateTransformToGoal() |
Updates all object orientations to the goal orientation for this solver, with smoothing accounted for (smoothing may be off) (Inherited from Solver) |
| UpdateWorkingPositionToGoal() |
Updates only the working position to goal with smoothing, if enabled (Inherited from Solver) |
| UpdateWorkingRotationToGoal() |
Updates only the working rotation to goal with smoothing, if enabled (Inherited from Solver) |
| UpdateWorkingScaleToGoal() |
Updates only the working scale to goal with smoothing, if enabled (Inherited from Solver) |
| UpdateWorkingToGoal() |
Updates the Working orientation (which may be the object, or the shared orientation) to the goal with smoothing, if enabled (Inherited from Solver) |