A SnapPoint indicates the properties about how a hand can snap to an object. The most important is the position/rotation and finger rotations for the hand, but it can also contain extra information like a valid holding surface (instead of just a single point) or a visual representation (using a hand-ghost)
More...
|
abstract ScoredHandPose | CalculateBestPose (HandPose userPose, float? scoreWeight=null, SnapDirection direction=SnapDirection.Any, float scale=1f) |
| Find the best valid hand-pose at this snap point. Remember that a snap point can actually have a whole surface the user can snap to. In some cases it can also have different hand scales with their surfaces, it will interpolate between the best available matches. More...
|
|
abstract Vector3 | NearestInSurface (Vector3 worldPoint, float scale=1f) |
| Find the closes point at the snap surface. If there is no surface, the SnapPoint position itself is returned. If multiple scales are available, it will interpolate between the closest matches. More...
|
|
abstract void | DestroyImmediate () |
| Destroys this snap point, to be called from the Inspector only. More...
|
|
|
Transform | relativeTo |
| The transform of the object this snap point refers to. Typically the parent. More...
|
|
bool | snapsBack |
| If true, the hand can be overriden to reach the object, and once it is grabbed it will move back (now holding it) to the user-tracking position. More...
|
|
float | slideThresold = 0f |
| Indicates how firmly the grab strength must be so the hand can slide. Normalised, a value of 1 will always slide, a value of 0.5 will start sliding only when the grab is half-released. More...
|
|
|
Transform | RelativeTo [get] |
| General getter for the transform of the object this snap point refers to More...
|
|
bool | SnapsBack [get] |
| General getter indicating if the hand can reach for the object and then move back to the user-tracked position. More...
|
|
float | SlideThresold [get] |
| General getter indicatig how firmly to held the object so the hand does not slide throught the surface. More...
|
|
A SnapPoint indicates the properties about how a hand can snap to an object. The most important is the position/rotation and finger rotations for the hand, but it can also contain extra information like a valid holding surface (instead of just a single point) or a visual representation (using a hand-ghost)
◆ CalculateBestPose()
abstract ScoredHandPose HandPosing.SnapRecording.BaseSnapPoint.CalculateBestPose |
( |
HandPose |
userPose, |
|
|
float? |
scoreWeight = null , |
|
|
SnapDirection |
direction = SnapDirection.Any , |
|
|
float |
scale = 1f |
|
) |
| |
|
pure virtual |
Find the best valid hand-pose at this snap point. Remember that a snap point can actually have a whole surface the user can snap to. In some cases it can also have different hand scales with their surfaces, it will interpolate between the best available matches.
- Parameters
-
userPose | Hand pose to compare to the snap point. |
scoreWeight | How much to score the position or the rotation difference. |
direction | Consider only poses at the surface using the provided direction. |
scale | The desired scale of the hand to compare. |
- Returns
- The most similar valid HandPose at this SnapPoint
Implemented in HandPosing.SnapRecording.SnapPointInterpolator, and HandPosing.SnapRecording.SnapPoint.
◆ DestroyImmediate()
abstract void HandPosing.SnapRecording.BaseSnapPoint.DestroyImmediate |
( |
| ) |
|
|
pure virtual |
◆ NearestInSurface()
abstract Vector3 HandPosing.SnapRecording.BaseSnapPoint.NearestInSurface |
( |
Vector3 |
worldPoint, |
|
|
float |
scale = 1f |
|
) |
| |
|
pure virtual |
◆ relativeTo
Transform HandPosing.SnapRecording.BaseSnapPoint.relativeTo |
|
protected |
The transform of the object this snap point refers to. Typically the parent.
◆ slideThresold
float HandPosing.SnapRecording.BaseSnapPoint.slideThresold = 0f |
|
protected |
Indicates how firmly the grab strength must be so the hand can slide. Normalised, a value of 1 will always slide, a value of 0.5 will start sliding only when the grab is half-released.
It is recommended to use this only with grabs based on physics Joints.
◆ snapsBack
bool HandPosing.SnapRecording.BaseSnapPoint.snapsBack |
|
protected |
If true, the hand can be overriden to reach the object, and once it is grabbed it will move back (now holding it) to the user-tracking position.
◆ RelativeTo
Transform HandPosing.SnapRecording.BaseSnapPoint.RelativeTo |
|
get |
General getter for the transform of the object this snap point refers to
◆ SlideThresold
float HandPosing.SnapRecording.BaseSnapPoint.SlideThresold |
|
get |
General getter indicatig how firmly to held the object so the hand does not slide throught the surface.
◆ SnapsBack
bool HandPosing.SnapRecording.BaseSnapPoint.SnapsBack |
|
get |
General getter indicating if the hand can reach for the object and then move back to the user-tracked position.
The documentation for this class was generated from the following file:
- Runtime/SnapRecording/BaseSnapPoint.cs