Humanoid Control options for leg related things
Sensors
See the list of supported devices to get information on the hand target of each device.
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.
Settings
- Rotation Speed Limitation
- Slide Prevention
Events
|
static FootTarget | CreateTarget (FootTarget oldTarget) |
|
static FootTarget | SetTarget (HumanoidControl humanoid, Transform targetTransform, bool isLeft) |
|
static bool | IsInitialized (HumanoidControl humanoid) |
|
static void | DetermineTarget (HumanoidControl humanoid, bool isLeft) |
| Checks whether the humanoid has a FootTarget 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 |
|
Side | side |
|
FootTarget | otherFoot |
|
LegMovements | legMovements = new LegMovements() |
|
bool | rotationSpeedLimitation = false |
| Limits the maximum rotation speed of the joints.
|
|
LegAnimator | legAnimator = new LegAnimator() |
|
ViveTrackerLeg | viveTracker = new ViveTrackerLeg() |
|
Kinect1Leg | kinect1 = new Kinect1Leg() |
|
Kinect2Foot | kinect2 = new Kinect2Foot() |
|
Kinect4Leg | kinect4 = new Kinect4Leg() |
|
AstraLeg | astra = new AstraLeg() |
|
OptitrackLeg | optitrack = new OptitrackLeg() |
|
AntilatencyLeg | antilatency = new AntilatencyLeg() |
|
CustomLeg | custom = new CustomLeg() |
|
TargetedUpperLegBone | upperLeg |
|
TargetedLowerLegBone | lowerLeg |
|
TargetedFootBone | foot |
|
TargetedToesBone | toes |
|
bool | jointLimitations = true |
|
bool | slidePrevention = false |
| Prevents movement of the foot when it is on the ground.
|
|
bool | physics = true |
|
GameObjectEventHandlers | groundEvent |
| Use to call functions based on the foot touching the ground.
|
|
Transform | ground |
|
Vector3 | groundNormal = Vector3.up |
|
Vector3 | groundTranslation = Vector3.zero |
|
float | groundDistance = 0 |
|
float | soleThicknessFoot |
|
float | soleThicknessToes |
|
HumanoidControl | humanoid |
|
|
const float | maxUpperLegAngle = 120 |
|
const float | maxLowerLegAngle = 130 |
|
const float | maxFootAngle = 50 |
|
const float | maxToesAngle = 30 |
|
static readonly Vector3 | minLeftUpperLegAngles = new Vector3(-130, -45, -50) |
|
static readonly Vector3 | maxLeftUpperLegAngles = new Vector3(30, 40, 30) |
|
static readonly Vector3 | minRightUpperLegAngles = new Vector3(-130, -40, -30) |
|
static readonly Vector3 | maxRightUpperLegAngles = new Vector3(30, 45, 50) |
|
static readonly Vector3 | minLeftLowerLegAngles = new Vector3(-15, float.NaN, float.NaN) |
|
static readonly Vector3 | maxLeftLowerLegAngles = new Vector3(130, float.NaN, float.NaN) |
|
static readonly Vector3 | minRightLowerLegAngles = new Vector3(-15, float.NaN, float.NaN) |
|
static readonly Vector3 | maxRightLowerLegAngles = new Vector3(130, float.NaN, float.NaN) |
|
static readonly Vector3 | minLeftFootAngles = new Vector3(-45, 0, -30) |
|
static readonly Vector3 | maxLeftFootAngles = new Vector3(70, 0, 20) |
|
static readonly Vector3 | minRightFootAngles = new Vector3(-45, 0, -20) |
|
static readonly Vector3 | maxRightFootAngles = new Vector3(50, 0, 30) |
|
static readonly Vector3 | minLeftToesAngles = new Vector3(-70, float.NaN, float.NaN) |
|
static readonly Vector3 | maxLeftToesAngles = new Vector3(45, float.NaN, float.NaN) |
|
static readonly Vector3 | minRightToesAngles = new Vector3(-70, float.NaN, float.NaN) |
|
static readonly Vector3 | maxRightToesAngles = new Vector3(45, float.NaN, float.NaN) |
|