Humanoid Control for Unity  v3
Passer.Humanoid.HandTarget Class Reference

Unity Inspector

Humanoid Control options for hand-related stuff

More information on the Humanoid Control Hand Target Component click here

Public Types

enum  PoseMethod { Position, Rotation }
 
enum  GrabbingTechnique { GrabbingTechnique.TouchGrabbing, GrabbingTechnique.NearGrabbing, GrabbingTechnique.NoGrabbing }
 Grabbing techniques More...
 
enum  GrabType { None, Palm, Pinch }
 

Public Member Functions

void GrabTouchedObject ()
 Try to grab the object we touch More...
 
void GrabNearObject ()
 Try to grab an object near to the hand More...
 
void NearGrabCheck ()
 Check the hand for grabbing near objects More...
 
void GrabCheck (GameObject obj)
 Try to take the object More...
 
void Grab (GameObject obj, bool rangeCheck=true)
 
override Transform GetDefaultTarget (HumanoidControl humanoid)
 
TargetedBone GetTargetBone (ArmBones boneID)
 
void RetrieveBones ()
 
void SetPose1 (Pose pose)
 
void SetPose (Pose pose, float weight)
 
bool GrabbedStaticObject ()
 
void LetGo ()
 
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 boneId, BoneTransform bone)
 
override void UpdateTarget ()
 
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)
 

Static Public Member Functions

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 More...
 

Public Attributes

bool isLeft
 Is this the left hand? More...
 
Side side
 Left or right hand side hand More...
 
Vector3 outward
 Vector pointing toward the outward direction of the hand. In general this is the index finger pointing direction More...
 
Vector3 up
 Vector3 pointing toward the up direction of the hand. This is the opposite side of the palm of the hand More...
 
FingersTarget fingers = null
 
bool rotationSpeedLimitation = false
 
Passer.Tracking.UnityXRController unity
 
UnityVRHand unity = new UnityVRHand()
 
ArmAnimator armAnimator = new ArmAnimator()
 
OpenVRHand openVR = new OpenVRHand()
 
ViveTrackerArm viveTracker = new ViveTrackerArm()
 
OculusHand oculus = new OculusHand()
 
WindowsMRHand mixedReality = new WindowsMRHand()
 
WaveVRHand waveVR = new WaveVRHand()
 
VrtkHand vrtk = new VrtkHand()
 
NeuronHand neuron = new NeuronHand()
 
LeapMotionHand leap = new LeapMotionHand()
 
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()
 
Transform stretchlessTarget
 
TargetedShoulderBone shoulder
 
TargetedUpperArmBone upperArm
 
TargetedForearmBone forearm
 
TargetedHandBone hand
 
PoseMethod poseMethod
 
bool physics = true
 Enables hand physics More...
 
AdvancedHandPhysics.PhysicsMode physicsMode = AdvancedHandPhysics.PhysicsMode.HybridKinematic
 
float strength = 100
 The strength of the arm when holding physics objects More...
 
GrabbingTechnique grabbingTechnique = GrabbingTechnique.TouchGrabbing
 The GrabbingType used to grab objects More...
 
bool touchInteraction = true
 Enables touch interaction More...
 
Pose grabPose
 
Pose closedPose
 
PoseMixer poseMixer = new PoseMixer()
 
HandSocket grabSocket
 The Socket for holding objects with the whole hand More...
 
Socket pinchSocket
 The Socket for holding objects between the thumb and index finger More...
 
InteractionModule inputModule
 
GameObject touchedObject = null
 
GameObject grabbedPrefab
 
GameObject grabbedObject
 
Handle grabbedHandle = null
 
Vector3 targetToHandle
 
GrabType grabType
 
bool grabbedRigidbody
 
bool grabbedKinematicRigidbody
 
List< Collider > colliders
 
bool twoHandedGrab = false
 
Vector3 targetToSecondaryHandle
 
PoseEventList poseEvent
 
GameObjectEventHandlers touchEvent
 
GameObjectEventHandlers grabEvent
 
Transform handPalm
 
Rigidbody handRigidbody
 
AdvancedHandPhysics handPhysics
 
HandMovements handMovements = new HandMovements()
 
ArmMovements armMovements = new ArmMovements()
 
bool directFingerMovements = true
 

Static Public Attributes

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)
 

Protected Member Functions

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)
 

Protected Attributes

bool grabChecking = false
 
List< SensorComponentsensorComponents = new List<SensorComponent>()
 
List< TrackedRigidbody > trackedRigidbodies = new List<TrackedRigidbody>()
 

Properties

override Passer.Sensor animator [get]
 
override TargetedBone main [get]
 
HandTargetotherHand [get]
 
Vector3 localPalmPosition [get]
 
Vector3 palmPosition [get]
 
Quaternion palmRotation [get]
 

Member Enumeration Documentation

◆ GrabbingTechnique

Grabbing techniques

Enumerator
TouchGrabbing 

try to grab the object when you touch it and you close the hand

NearGrabbing 

try to grab an object near to your hand when you close the hand

NoGrabbing 

do not try to grab objects when you close the hand

Member Function Documentation

◆ GrabTouchedObject()

void Passer.Humanoid.HandTarget.GrabTouchedObject ( )

Try to grab the object we touch

◆ GrabNearObject()

void Passer.Humanoid.HandTarget.GrabNearObject ( )

Try to grab an object near to the hand

◆ NearGrabCheck()

void Passer.Humanoid.HandTarget.NearGrabCheck ( )

Check the hand for grabbing near objects

This function will grab a near object if the hand is grabbing

◆ GrabCheck()

void Passer.Humanoid.HandTarget.GrabCheck ( GameObject  obj)

Try to take the object

Parameters
objThe object to take

Depending on the hand pose the object may be grabbed, pinched or not summary>Try to grab the object

◆ DetermineTarget()

static void Passer.Humanoid.HandTarget.DetermineTarget ( HumanoidControl  humanoid,
bool  isLeft 
)
static

Checks whether the humanoid has an HandTarget and adds one if none has been found

Parameters
humanoidThe humanoid to check
isLeftIs this the left hand?

Member Data Documentation

◆ isLeft

bool Passer.Humanoid.HandTarget.isLeft

Is this the left hand?

◆ side

Side Passer.Humanoid.HandTarget.side

Left or right hand side hand

◆ outward

Vector3 Passer.Humanoid.HandTarget.outward

Vector pointing toward the outward direction of the hand. In general this is the index finger pointing direction

◆ up

Vector3 Passer.Humanoid.HandTarget.up

Vector3 pointing toward the up direction of the hand. This is the opposite side of the palm of the hand

◆ physics

bool Passer.Humanoid.HandTarget.physics = true

Enables hand physics

◆ strength

float Passer.Humanoid.HandTarget.strength = 100

The strength of the arm when holding physics objects

◆ grabbingTechnique

GrabbingTechnique Passer.Humanoid.HandTarget.grabbingTechnique = GrabbingTechnique.TouchGrabbing

The GrabbingType used to grab objects

◆ touchInteraction

bool Passer.Humanoid.HandTarget.touchInteraction = true

Enables touch interaction

◆ grabSocket

HandSocket Passer.Humanoid.HandTarget.grabSocket

The Socket for holding objects with the whole hand

◆ pinchSocket

Socket Passer.Humanoid.HandTarget.pinchSocket

The Socket for holding objects between the thumb and index finger

◆ poseEvent

PoseEventList Passer.Humanoid.HandTarget.poseEvent
Initial value:
= new PoseEventList() {
id = 1,
label = "Pose Event",
tooltip =
"Call functions based on recognized poses" +
"Parameter: the recognized pose",
eventTypeLabels = new string[] {
"Never",
"On Pose Recognized",
"On No Pose Recongnized",
"While Pose Recognized",
"While No Pose Recognized",
"While Pose Changes",
"Always",
},
fromEventLabel = "poseMixer.detectedPose",
}

◆ touchEvent

GameObjectEventHandlers Passer.Humanoid.HandTarget.touchEvent
Initial value:
= new GameObjectEventHandlers() {
id = 2,
label = "Touch Event",
tooltip =
"Call funtions based on touched objects" +
"Parameter: the touched object",
eventTypeLabels = new string[] {
"Never",
"On Touch Start",
"On Touch End",
"While Touching",
"While not Touching",
"On Touched Object Changes",
"Always",
},
fromEventLabel = "touchedObject",
}

◆ grabEvent

GameObjectEventHandlers Passer.Humanoid.HandTarget.grabEvent
Initial value:
= new GameObjectEventHandlers() {
id = 3,
label = "Grab Event",
tooltip =
"Call functions based on grabbed objects" +
"Parameter: the grabbed object",
eventTypeLabels = new string[] {
"Never",
"On Grab Start",
"On Grab End",
"While Holding Object",
"While not Holding Object",
"On Grabbed Object Changes",
"Always",
},
fromEventLabel = "grabbedObject",
}

The documentation for this class was generated from the following files: