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

Humanoid Control options for hand-related stuff More...

Inherits Passer.Humanoid.HumanoidTarget.

Public Types

enum  PoseMethod { Position, Rotation }
 
enum  GrabType { None, Palm, Pinch }
 

Public Member Functions

override Transform GetDefaultTarget (HumanoidControl humanoid)
 
TargetedBone GetTargetBone (ArmBones boneID)
 
void RetrieveBones ()
 
void SetPose1 (Pose pose)
 
void SetPose (Pose pose, float weight)
 
bool GrabbedStaticObject ()
 
void Grab (GameObject obj, bool rangeCheck=true)
 summary>Let go the object the hand is holding (if any) More...
 
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)
 
void OnDrawGizmos ()
 
void OnDrawGizmosSelected ()
 
virtual void DrawTensions ()
 
abstract void InitSensors ()
 
virtual void StartSensors ()
 
virtual void StopSensors ()
 

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

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...
 
bool grabbing = true
 Enables grabbing of 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
 
HumanoidControl humanoid
 

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)
 
virtual void DrawTensionGizmo (TargetedBone targetedBone)
 
virtual void UpdateSensors ()
 

Protected Attributes

List< SensorComponentsensorComponents = new List<SensorComponent>()
 
List< TrackedRigidbody > trackedRigidbodies = new List<TrackedRigidbody>()
 
bool _showRealObjects = true
 

Properties

override Passer.Sensor animator [get]
 
override TargetedBone main [get]
 
HandTargetotherHand [get]
 
Vector3 localPalmPosition [get]
 
Vector3 palmPosition [get]
 
Quaternion palmRotation [get]
 
virtual bool showRealObjects [get, set]
 show the target meshes More...
 

Detailed Description

Humanoid Control options for hand-related stuff

More information on the Humanoid Control Hand Target Component click here

Member Function Documentation

◆ Grab()

void Passer.Humanoid.HandTarget.Grab ( GameObject  obj,
bool  rangeCheck = true 
)

summary>Let go the object the hand is holding (if any)

◆ 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

◆ grabbing

bool Passer.Humanoid.HandTarget.grabbing = true

Enables grabbing of 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",
}

Property Documentation

◆ showRealObjects

virtual bool Passer.Target.showRealObjects
getsetinherited

show the target meshes


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