Humanoid Control for Unity v4
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
Passer.Humanoid.FootTarget Class Reference

Description

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

Events

Inheritance diagram for Passer.Humanoid.FootTarget:
Passer.Humanoid.HumanoidTarget Passer.Target

Public Member Functions

override void InitSensors ()
 
override void StartSensors ()
 
Bone GetBoneId (bool isLeft, LegBones armBone)
 
TargetedBone GetTargetBone (LegBones boneID)
 
virtual void ClearBones ()
 
override Transform GetDefaultTarget (HumanoidControl humanoid)
 
void RetrieveBones ()
 
void ShowControllers (bool shown)
 
override void InitAvatar ()
 
override void NewComponent (HumanoidControl _humanoid)
 
override void InitComponent ()
 
override void StartTarget ()
 
bool IsInTPose ()
 
override void MatchTargetsToAvatar ()
 
override void InitializeTrackingConfidence ()
 
override void UpdateTarget ()
 
override void UpdateMovements (HumanoidControl humanoid)
 
override void CopyTargetToRig ()
 
override void CopyRigToTarget ()
 
void UpdateSensorsFromTarget ()
 
void CheckGrounded ()
 
void OnDrawGizmos ()
 
void OnDrawGizmosSelected ()
 
virtual void DrawTensions ()
 
virtual void StopSensors ()
 

Static Public Member Functions

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)
 

Public Attributes

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
 

Static Public Attributes

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)
 

Protected Member Functions

override void UpdateSensors ()
 
void InitSubTargets ()
 
virtual void UpdateEvents ()
 
override void DrawTargetRig (HumanoidControl humanoid)
 
override void DrawAvatarRig (HumanoidControl humanoid)
 
virtual void DrawTensionGizmo (TargetedBone targetedBone)
 

Protected Attributes

bool _showRealObjects = true
 

Properties

override Passer.Sensor animator [get]
 
override TargetedBone main [get]
 
virtual bool showRealObjects [get, set]
 show the target meshes
 

Member Function Documentation

◆ StartSensors()

override void Passer.Humanoid.FootTarget.StartSensors ( )
virtual

Reimplemented from Passer.Target.

◆ UpdateSensors()

override void Passer.Humanoid.FootTarget.UpdateSensors ( )
protectedvirtual

Reimplemented from Passer.Target.

◆ NewComponent()

override void Passer.Humanoid.FootTarget.NewComponent ( HumanoidControl  _humanoid)
virtual

Reimplemented from Passer.Humanoid.HumanoidTarget.

◆ InitComponent()

override void Passer.Humanoid.FootTarget.InitComponent ( )
virtual

Reimplemented from Passer.Target.

◆ DetermineTarget()

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

Checks whether the humanoid has a FootTarget and adds one if none has been found.

Parameters
humanoidThe humanoid to check
isLeftIs this the left foot?

◆ DrawTargetRig()

override void Passer.Humanoid.FootTarget.DrawTargetRig ( HumanoidControl  humanoid)
protectedvirtual

Reimplemented from Passer.Humanoid.HumanoidTarget.

◆ DrawAvatarRig()

override void Passer.Humanoid.FootTarget.DrawAvatarRig ( HumanoidControl  humanoid)
protectedvirtual

Reimplemented from Passer.Humanoid.HumanoidTarget.

Member Data Documentation

◆ rotationSpeedLimitation

bool Passer.Humanoid.FootTarget.rotationSpeedLimitation = false

Limits the maximum rotation speed of the joints.

This can result in more natural movements with optical tracking solutions.

◆ groundEvent

GameObjectEventHandlers Passer.Humanoid.FootTarget.groundEvent
Initial value:
= new GameObjectEventHandlers() {
id = 1,
label = "Ground Event",
tooltip =
"Call function based on ground standing\n" +
"Parameter: the ground object",
eventTypeLabels = new string[] {
"Never",
"On Grounded",
"On not Grounded",
"While Grounded",
"While not Grounded",
"When Ground Changes",
"Always"
},
fromEventLabel = "ground.gameObject"
}

Use to call functions based on the foot touching the ground.


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