Humanoid Control options for head-related things
%Sensors
Depending on the selected Inputs in HumanoidControl, a number of controllers are available for the Head Target. These can be individually enabled or disabled to suit your needs. For example you can disable head tracking using Kinect while still have body tracking on other parts of the body.
See the list of supported devices to get information on the head target of each device.
Sub Targets (Pro)
Sub targets are used in combination with facial tracking. Depending on the tracking device, additional facial target can be tracked and used. When the microphone has been enabled, the Audio Energy will show the received volume of sound.
Configuration (Pro)
Configuration is used in combination with facial tracking.
Expressions (Pro)
In Humanoid Control Pro, facial expressions can be defined and set. For more information see Facial Expressions.
Focus Object (Pro)
This is the object the humanoid is looking at. With eye tracking, this is determined from the detected gaze direction, without eye tracking a raycast from the eyes is used in the forward direction of the head.
Settings
Events
- Tracking Event
- Audio Event
- Focus Event (Pro)
- Blink Event (Pro)
- In Collider Event
Buttons
|
override void | InitSensors () |
|
override void | StartSensors () |
|
void | TurnTo (GameObject obj) |
|
void | TurnTo (GameObject obj, float confidence) |
|
void | LookTo (Vector3 position) |
|
void | TurnTo (Vector3 position, float confidence) |
|
void | SetLookDirection (Vector3 direction, float confidence) |
|
override Transform | GetDefaultTarget (HumanoidControl humanoid) |
|
void | RetrieveBones () |
|
override void | InitAvatar () |
|
override void | NewComponent (HumanoidControl _humanoid) |
|
override void | InitComponent () |
|
override void | StartTarget () |
|
override void | MatchTargetsToAvatar () |
|
override void | InitializeTrackingConfidence () |
|
override void | UpdateTarget () |
| Update all head sensors.
|
|
override void | UpdateMovements (HumanoidControl humanoid) |
| Updates the avatar bones based on the current target rig.
|
|
override void | CopyTargetToRig () |
| Copy the head target to the target rig.
|
|
override void | CopyRigToTarget () |
| Copy the target rig head bone to the head target.
|
|
void | UpdateSensorsFromTarget () |
| Update the sensor locations based on the head target.
|
|
void | RotationX (float angle) |
| Sets the rotation of the head around the X axis.
|
|
void | RotationY (float angle) |
| Sets the rotation of the head around the Y axis.
|
|
virtual Vector3 | GetEyePosition () |
| Gets the eye position in world coordinates.
|
|
Vector3 | GetNeckEyeDelta () |
| Gets the local eye position relative to the neck bone.
|
|
Vector3 | GetHeadEyeDelta () |
| Gets the local eye position realtive to the head bone.
|
|
Vector3 | GetNeckHeadDelta () |
| Gets the local head position relative to the neck bone.
|
|
void | DisableVR () |
|
void | EnableVR () |
|
void | OnDrawGizmos () |
|
void | OnDrawGizmosSelected () |
|
virtual void | DrawTensions () |
|
virtual void | StopSensors () |
|
|
static HeadTarget | CreateTarget (HumanoidTarget oldTarget) |
|
static HeadTarget | SetTarget (HumanoidControl humanoid, Transform targetTransform) |
|
static void | GetDefaultNeck (Animator rig, ref Transform boneTransform) |
|
static void | GetDefaultHead (Animator rig, ref Transform boneTransform) |
|
static void | ClearBones (HeadTarget headTarget) |
|
static bool | IsInitialized (HumanoidControl humanoid) |
| Is the head target initialized?
|
|
static void | DetermineTarget (HumanoidControl humanoid) |
| Checks whether the humanoid has an HeadTargetand adds one if none has been found.
|
|
static Quaternion | GetRotationAround (Vector3 axis, Quaternion rotation) |
|
static Quaternion | Normalize (Quaternion q) |
|
static void | GetSwingTwist (Vector3 axis, Quaternion rotation, out Quaternion swing, out Quaternion twist) |
|
static SkinnedMeshRenderer[] | FindAvatarMeshes (HumanoidControl humanoid) |
|
static string[] | DistillAvatarMeshNames (SkinnedMeshRenderer[] meshes) |
|
static int | FindMeshWithBlendshapes (SkinnedMeshRenderer[] renderers) |
|
static int | FindBlendshapemesh (SkinnedMeshRenderer[] renderers, SkinnedMeshRenderer renderer) |
|
static string[] | GetBlendshapes (SkinnedMeshRenderer renderer) |
|
static void | FindBlendshapeWith (string[] blendshapes, string namepart1, string namepart2, ref int blendshape) |
|
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 | tracking |
| Is the Head Target updated using an active tracking device.
|
|
Passer.Tracking.UnityXRHmd | unity |
|
HeadAnimator | headAnimator = new HeadAnimator() |
| Controls the head when no tracking is active.
|
|
UnityXRHead | unityXR = new UnityXRHead() |
|
ViveTrackerHead | viveTracker = new ViveTrackerHead() |
|
WindowsMRHead | mixedReality = new WindowsMRHead() |
|
WaveVRHead | waveVR = new WaveVRHead() |
|
Kinect1Head | kinect1 = new Kinect1Head() |
|
Kinect2Head | kinect2 = new Kinect2Head() |
|
Kinect4Head | kinect4 = new Kinect4Head() |
|
AstraHead | astra = new AstraHead() |
|
IntelRealsenseHead | realsense = new IntelRealsenseHead() |
|
OptitrackHead | optitrack = new OptitrackHead() |
|
AntilatencyHead | antilatency = new AntilatencyHead() |
|
CustomHead | custom = new CustomHead() |
|
MicrophoneHead | microphone = new MicrophoneHead() |
|
Kinect2Face | kinectFace |
|
TobiiHead | tobiiHead = new TobiiHead() |
|
ArKitHead | arkit = new ArKitHead() |
|
Tracking.Pupil.Head | pupil = new Tracking.Pupil.Head() |
|
DlibHead | dlib = new DlibHead() |
|
HeadSensor[] | sensors |
|
TargetedHeadBone | head = null |
|
TargetedNeckBone | neck = null |
|
FaceTarget | face = null |
|
float | audioEnergy |
|
Vector3 | lookDirection = Vector3.forward |
|
Vector3 | localLookDirection = Vector3.forward |
|
Vector3 | neck2eyes |
|
Vector3 | head2eyes |
|
bool | collisionFader = false |
| Adds a screen fader which blacks out the camera when the head enters objects.
|
|
bool | isInsideCollider = false |
|
bool | virtual3d = false |
|
Transform | screenTransform |
|
BoolEventHandlers | trackingEvent |
| Use to call functions based on the tracking status of the headset.
|
|
FloatEventHandlers | audioEvent |
| Use to call functions based on the audio level measured with the microphone.
|
|
GameObjectEventHandlers | focusEvent |
| Use to call functions based on the object in focus.
|
|
BoolEventHandlers | blinkEvent |
| Use to call functions based on eye blinking.
|
|
BoolEventHandlers | insideColliderEvent |
| Use to call functions based on the state of the head being inside colliders.
|
|
SkinnedMeshRenderer | smRenderer |
|
Rigidbody | headRigidbody |
|
HeadMovements | headMovements = new HeadMovements() |
|
HumanoidControl | humanoid |
|
|
const float | maxNeckAngle = 80 |
|
const float | maxHeadAngle = 50 |
|
static readonly float | neckTurnRatio = 0.65F |
|
static readonly Vector3 | minHeadAngles = new Vector3(0, 0, 0) |
|
static readonly Vector3 | maxHeadAngles = new Vector3(0, 0, 0) |
|
static readonly Vector3 | minNeckAngles = new Vector3(-55, -70, -35) |
|
static readonly Vector3 | maxNeckAngles = new Vector3(80, 70, 35) |
|
static readonly Vector | minNeckAngles2 = new Vector(-55, -70, 0) |
|
static readonly Vector | maxNeckAngles2 = new Vector(80, 70, 0) |
|