All Classes Namespaces Functions Variables Enumerations Properties Pages
Public Attributes | List of all members
IKSolverVR.Leg Class Reference

4-segmented analytic leg chain. More...

Inheritance diagram for IKSolverVR.Leg:
Inheritance graph
[legend]
Collaboration diagram for IKSolverVR.Leg:
Collaboration graph
[legend]

Public Attributes

Transform target
 The foot/toe target. This should not be the foot tracker itself, but a child GameObject parented to it so you could adjust it's position/rotation to match the orientation of the foot/toe bone. If a toe bone is assigned in the References, the solver will match the toe bone to this target. If no toe bone assigned, foot bone will be used instead. More...
 
Transform bendGoal
 The knee will be bent towards this Transform if 'Bend Goal Weight' > 0. More...
 
float positionWeight
 Positional weight of the toe/foot target. Note that if you have nulled the target, the foot will still be pulled to the last position of the target until you set this value to 0. More...
 
float rotationWeight
 Rotational weight of the toe/foot target. Note that if you have nulled the target, the foot will still be rotated to the last rotation of the target until you set this value to 0. More...
 
float bendGoalWeight
 If greater than 0, will bend the knee towards the 'Bend Goal' Transform. More...
 
float swivelOffset
 Angular offset of knee bending direction. More...
 
float bendToTargetWeight = 0.5f
 If 0, the bend plane will be locked to the rotation of the pelvis and rotating the foot will have no effect on the knee direction. If 1, to the target rotation of the leg so that the knee will bend towards the forward axis of the foot. Values in between will be slerped between the two. More...
 
float legLengthMlp = 1f
 Use this to make the leg shorter/longer. Works by displacement of foot and calf localPosition. More...
 
AnimationCurve stretchCurve = new AnimationCurve()
 Evaluates stretching of the leg by target distance relative to leg length. Value at time 1 represents stretching amount at the point where distance to the target is equal to leg length. Value at time 1 represents stretching amount at the point where distance to the target is double the leg length. Value represents the amount of stretching. Linear stretching would be achieved with a linear curve going up by 45 degrees. Increase the range of stretching by moving the last key up and right at the same amount. Smoothing in the curve can help reduce knee snapping (start stretching the arm slightly before target distance reaches leg length). To get a good optimal value for this curve, please go to the 'VRIK (Basic)' demo scene and copy the stretch curve over from the Pilot character. More...
 
Vector3 IKPosition
 Target position of the toe/foot. Will be overwritten if target is assigned. More...
 
Quaternion IKRotation = Quaternion.identity
 Target rotation of the toe/foot. Will be overwritten if target is assigned. More...
 
Vector3 footPositionOffset
 Position offset of the toe/foot. Will be applied on top of target position and reset to Vector3.zero after each update. More...
 
Vector3 heelPositionOffset
 Position offset of the heel. Will be reset to Vector3.zero after each update. More...
 
Quaternion footRotationOffset = Quaternion.identity
 Rotation offset of the toe/foot. Will be reset to Quaternion.identity after each update. More...
 
float currentMag
 The length of the leg (calculated in last read). More...
 
bool useAnimatedBendNormal
 If true, will sample the leg bend angle each frame from the animation. More...
 

Detailed Description

4-segmented analytic leg chain.