Humanoid Control options for hand-related things
Sensors
See the list of supported devices to get information on the hand target of each device.
Sub Targets
Thumb and Finger Curl
The current curl value of the thumb and/or fingers is found here. It is possible to control the curl value of a finger of thumb directly using the slider during play if it is not directly controlled by input or hand poses. If it is controlled by input, the current curl value can be seen here.
Configuration
Bones
For Mecanim compatible avatars, the correct bones are detected automatically. For other avatars, the correct bone Transforms can be assigned manually using the Bone parameters. It is also possible to override the default bones from Mecanim with your own choice by manual assignment of the bone. To return to the default bone, it is sufficient to clear the applicable Bone parameter. For the thumb and finger bones, only the first, proximal bone is needed, other child bones will be detected automatically.
Limits
For the arm bones, it is possible to configure the limits of movement. The maximum angle can be set when Joint Limitations is enabled.
Hand Pose
Shows the currently detected hand pose. More information on hand poses can be found here.
Settings
- Show Real Objects
- Rotation Speed Limitation
- Touch Interaction
- Physics
- Strength
Events
- Pose Event
- Touch Event
- Grab Event
Buttons
|
virtual void | StartInteraction () |
|
virtual HandSocket | CreateGrabSocket () |
|
Socket | CreatePinchSocket () |
|
void | OnNearing (GameObject obj) |
|
virtual void | OnTouchStart (GameObject obj, Vector3 contactPoint) |
|
virtual void | OnTouchEnd (GameObject obj) |
|
void | GrabTouchedObject () |
| Try to grab the object we touch.
|
|
void | NearGrabCheck () |
| Check the hand for grabbing near objects.
|
|
void | GrabNearObject () |
| Try to grab an object near to the hand.
|
|
void | GrabCheck (GameObject obj) |
| Try to take the object.
|
|
virtual bool | CanBeGrabbed (GameObject obj) |
|
virtual void | Grab (GameObject obj, bool rangeCheck=true) |
| Grab and object with the hand (non-networked)
|
|
void | GrabHandle (Handle handle, bool rangeCheck=false) |
|
virtual void | LetGo () |
|
void | GrabOrLetGo (GameObject obj, bool rangeCheck=true) |
|
override Transform | GetDefaultTarget (HumanoidControl humanoid) |
|
Bone | GetBoneId (bool isLeft, ArmBones armBone) |
|
TargetedBone | GetTargetBone (ArmBones boneID) |
|
void | RetrieveBones () |
|
void | SetPose1 (Pose pose) |
|
void | SetPose (Pose pose, float weight) |
|
bool | TouchedStaticObject () |
|
bool | GrabbedStaticObject () |
|
Vector3 | HandBoneRightAxis () |
|
Vector3 | HandBoneOutwardAxis () |
|
void | InitTarget () |
|
override void | InitAvatar () |
|
override void | NewComponent (HumanoidControl _humanoid) |
|
override void | InitComponent () |
|
override void | StartTarget () |
|
override void | MatchTargetsToAvatar () |
|
void | CopyBoneToTarget (ArmBones armBone, TargetedBone bone) |
|
override void | InitializeTrackingConfidence () |
|
override void | UpdateTarget () |
|
void | SetTargets () |
|
override void | UpdateMovements (HumanoidControl humanoid) |
|
override void | CopyTargetToRig () |
|
override void | CopyRigToTarget () |
|
void | UpdateSensorsFromTarget () |
|
float | GetFingerCurl (Finger fingerID) |
|
float | GetFingerCurl (FingersTarget.TargetedFinger finger) |
|
void | AddFingerCurl (Finger fingerID, float curlValue) |
|
void | SetFingerCurl (Finger fingerID, float curlValue) |
|
void | SetFingerGroupCurl (FingersTarget.FingerGroup fingerGroupID, float curlValue) |
|
void | DetermineFingerCurl (Finger fingerID) |
|
float | HandCurl () |
|
void | Vibrate (float strength) |
|
void | OnDrawGizmos () |
|
void | OnDrawGizmosSelected () |
|
virtual void | DrawTensions () |
|
void | InitSensors () |
|
virtual void | StartSensors () |
|
virtual void | StopSensors () |
|
|
static HandTarget | CreateTarget (HandTarget oldTarget) |
|
static HandTarget | SetTarget (HumanoidControl humanoid, Transform targetTransform, bool isLeft) |
|
static void | ClearBones (HandTarget handTarget) |
|
static void | TmpDisableCollisions (HandTarget handTarget, float duration) |
|
static bool | IsInitialized (HumanoidControl humanoid) |
|
static void | DetermineTarget (HumanoidControl humanoid, bool isLeft) |
| Checks whether the humanoid has an HandTarget and adds one if none has been found.
|
|
static Vector | ToVector (Vector3 vector3) |
|
static Vector3 | ToVector3 (Vector position) |
|
static Rotation | ToRotation (Quaternion quaternion) |
|
static Quaternion | ToQuaternion (Rotation orientation) |
|
static void | SetRotation (Transform transform, Rotation orientation) |
|
static void | DrawTarget (Confidence confidence, Transform target, Vector3 direction, float length) |
|
static void | DrawTargetBone (TargetedBone bone, Vector3 direction) |
|
static void | DrawTargetBone (TargetTransform target, Vector3 direction) |
|
static void | DrawAvatarBone (TargetedBone bone, Vector3 direction) |
|
static void | DrawAvatarBone (BoneTransform bone, Vector3 direction) |
|
static void | GetDefaultBone (Animator rig, ref Transform boneTransform, Bone boneId, params string[] boneNames) |
|
static void | GetDefaultBone (Animator rig, ref Transform boneTransform, HumanBodyBones boneID, params string[] boneNames) |
|
static void | GetDefaultBone (Animator rig, ref Transform boneTransform, params string[] boneNames) |
|
static void | GetDefaultTargetBone (Animator rig, ref Transform boneTransform, Bone boneID, params string[] boneNames) |
|
static List< Collider > | SetColliderToTrigger (GameObject obj) |
|
static List< Collider > | SetColliderToTrigger (Rigidbody rb) |
|
static void | UnsetColliderToTrigger (List< Collider > colliders) |
|
static void | UnsetColliderToTrigger (List< Collider > colliders, Collider collider) |
|
|
bool | isLeft |
| Is this the left hand?
|
|
Side | side |
| Left or right hand side hand.
|
|
Vector3 | outward |
| Vector pointing toward the outward direction of the hand. In general this is the index finger pointing direction.
|
|
Vector3 | up |
| Vector3 pointing toward the up direction of the hand. This is the opposite side of the palm of the hand.
|
|
FingersTarget | fingers = null |
|
bool | rotationSpeedLimitation = false |
| Limits the maximum rotation speed of the joints. This can result in more natural movements with optical tracking solutions.
|
|
UnityXRController | unity |
|
ArmAnimator | armAnimator = new ArmAnimator() |
|
UnityXRHand | unityXR = new UnityXRHand() |
|
ViveTrackerArm | viveTracker = new ViveTrackerArm() |
|
WindowsMRHand | mixedReality = new WindowsMRHand() |
|
WaveVRHand | waveVR = new WaveVRHand() |
|
LeapHand | leap = new LeapHand() |
|
Kinect1Arm | kinect1 = new Kinect1Arm() |
|
Kinect2Arm | kinect2 = new Kinect2Arm() |
|
Kinect4Arm | kinect4 = new Kinect4Arm() |
|
AstraArm | astra = new AstraArm() |
|
RazerHydraHand | hydra = new RazerHydraHand() |
|
OptitrackArm | optitrack = new OptitrackArm() |
|
AntilatencyHand | antilatency = new AntilatencyHand() |
|
Hi5Hand | hi5 = new Hi5Hand() |
|
CustomArm | custom = new CustomArm() |
|
Transform | stretchlessTarget |
|
TargetedShoulderBone | shoulder |
|
TargetedUpperArmBone | upperArm |
|
TargetedForearmBone | forearm |
|
TargetedHandBone | hand |
|
PoseMethod | poseMethod |
|
bool | physics = true |
| Enables physics for this hand.
|
|
AdvancedHandPhysics.PhysicsMode | physicsMode = AdvancedHandPhysics.PhysicsMode.HybridKinematic |
|
float | strength = 100 |
| The strength of the arm when interacting with physics.
|
|
GrabbingTechnique | grabbingTechnique = GrabbingTechnique.TouchGrabbing |
| The GrabbingType used to grab objects.
|
|
bool | touchInteraction = true |
| Enables touch interaction with the envrionment.
|
|
Pose | detectedPose |
|
PoseMixer | poseMixer = new PoseMixer() |
|
HandSocket | grabSocket |
| The Socket for holding objects with the whole hand.
|
|
Socket | pinchSocket |
| The Socket for holding objects between the thumb and index finger.
|
|
InteractionModule | inputModule |
|
GameObject | touchedObject = null |
|
GameObject | grabbedPrefab |
|
GameObject | grabbedObject |
|
Handle | grabbedHandle = null |
|
Vector3 | targetToHandle |
|
bool | grabbedRigidbody |
|
bool | grabbedKinematicRigidbody |
|
List< Collider > | colliders |
|
bool | twoHandedGrab = false |
|
Vector3 | targetToSecondaryHandle |
|
IntEventHandlers | poseEvent |
| Use to call functions based on the defined poses of the hand.
|
|
GameObjectEventHandlers | touchEvent |
| Use to call functions based on the hand touching objects.
|
|
GameObjectEventHandlers | grabEvent |
| Use to call functions based on the hand grabbing objects.
|
|
Transform | handPalm |
|
Rigidbody | handRigidbody |
|
AdvancedHandPhysics | handPhysics |
|
HandMovements | handMovements = new HandMovements() |
|
ArmMovements | armMovements = new ArmMovements() |
|
bool | grabbedChanged |
|
bool | directFingerMovements = true |
|
HumanoidControl | humanoid |
|
|
static float | maxGrabbingMass = 10 |
| The maximum mass of object you can grab.
|
|
const float | maxShoulderAngle = 30 |
|
const float | maxUpperArmAngle = 120 |
|
const float | maxForearmAngle = 130 |
|
const float | maxHandAngle = 100 |
|
static readonly Vector3 | minLeftShoulderAngles = new Vector3(0, 0, -45) |
|
static readonly Vector3 | maxLeftShoulderAngles = new Vector3(0, 45, 0) |
|
static readonly Vector3 | minRightShoulderAngles = new Vector3(0, -45, 0) |
|
static readonly Vector3 | maxRightShoulderAngles = new Vector3(0, 0, 45) |
|
static readonly Vector3 | minLeftUpperArmAngles = new Vector3(-180, -45, -180) |
|
static readonly Vector3 | maxLeftUpperArmAngles = new Vector3(60, 130, 45) |
|
static readonly Vector3 | minRightUpperArmAngles = new Vector3(-180, -130, -45) |
|
static readonly Vector3 | maxRightUpperArmAngles = new Vector3(60, 45, 180) |
|
static readonly Vector3 | minLeftForearmAngles = new Vector3(0, 0, 0) |
|
static readonly Vector3 | maxLeftForearmAngles = new Vector3(0, 150, 0) |
|
static readonly Vector3 | minRightForearmAngles = new Vector3(0, -150, 0) |
|
static readonly Vector3 | maxRightForearmAngles = new Vector3(0, 0, 0) |
|
static readonly Vector3 | minLeftHandAngles = new Vector3(-180, -50, -70) |
|
static readonly Vector3 | maxLeftHandAngles = new Vector3(90, 20, 90) |
|
static readonly Vector3 | minRightHandAngles = new Vector3(-90, -20, -70) |
|
static readonly Vector3 | maxRightHandAngles = new Vector3(45, 50, 70) |
|
|
void | MoveToPalm (Transform t) |
|
void | DeterminePalmPosition () |
|
void | LerpToGrab (GameObject obj) |
|
virtual GameObject | DetermineGrabObject () |
|
bool | GrabbedWithOtherHand (GameObject obj) |
|
bool | SecondHandGrab (GameObject obj, bool rangeCheck) |
|
virtual bool | GrabHandle (Rigidbody objRigidbody, Handle handle, bool rangeCheck) |
|
virtual bool | GrabRigidbody (Rigidbody objRigidbody, bool rangeCheck=true) |
|
virtual bool | GrabRigidbodyHandle (Rigidbody objRigidbody, Handle handle, bool rangeCheck) |
|
virtual bool | GrabRigidbodyWithoutHandle (Rigidbody objRigidbody) |
|
virtual bool | GrabRigidbodyParenting (Rigidbody objRigidbody) |
|
virtual bool | GrabStaticWithoutHandle (GameObject obj) |
|
virtual void | CheckLetGo () |
|
virtual bool | PulledLoose () |
| summary>Let go the object the hand is holding (if any)
|
|
virtual void | LetGoRigidbodyWithoutHandle () |
|
virtual void | LetGoStaticWithoutHandle () |
|
virtual void | LetGoRigidbody (Rigidbody grabbedRigidbody) |
|
virtual void | LetGoHandle (Handle handle) |
|
void | LetGoPinch () |
|
void | InitSubTargets () |
|
virtual void | UpdateEvents () |
|
void | CheckRigidbody () |
|
void | UpdateUsingTrackedRigidbody (TrackedRigidbody trackedRigidbody) |
|
void | UpdateTwoHanded2 () |
|
Vector3 | Orthagonal (Transform primaryTransform, Transform secondaryTransform) |
|
override void | DrawTargetRig (HumanoidControl humanoid) |
|
override void | DrawAvatarRig (HumanoidControl humanoid) |
|
void | CheckColliders () |
|
virtual void | GenerateColliders () |
|
virtual void | DrawTensionGizmo (TargetedBone targetedBone) |
|
virtual void | UpdateSensors () |
|