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

4-segmented analytic arm chain. More...

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

Public Attributes

Transform target
 The hand target. This should not be the hand controller itself, but a child GameObject parented to it so you could adjust it's position/rotation to match the orientation of the hand bone. The best practice for setup would be to move the hand controller to the avatar's hand as it it was held by the avatar, duplicate the avatar's hand bone and parent it to the hand controller. Then assign the duplicate to this slot. More...
 
Transform bendGoal
 The elbow will be bent towards this Transform if 'Bend Goal Weight' > 0. More...
 
float positionWeight = 1f
 Positional weight of the hand target. Note that if you have nulled the target, the hand will still be pulled to the last position of the target until you set this value to 0. More...
 
float rotationWeight = 1f
 Rotational weight of the hand target. Note that if you have nulled the target, the hand will still be rotated to the last rotation of the target until you set this value to 0. More...
 
ShoulderRotationMode shoulderRotationMode = ShoulderRotationMode.YawPitch
 Different techniques for shoulder bone rotation. More...
 
float shoulderRotationWeight = 1f
 The weight of shoulder rotation. More...
 
float shoulderTwistWeight = 1f
 The weight of twisting the shoulders backwards when arms are lifted up. More...
 
float bendGoalWeight
 If greater than 0, will bend the elbow towards the 'Bend Goal' Transform. More...
 
float swivelOffset
 Angular offset of the elbow bending direction. More...
 
Vector3 wristToPalmAxis = Vector3.zero
 Local axis of the hand bone that points from the wrist towards the palm. Used for defining hand bone orientation. If you have copied VRIK component from another avatar that has different bone orientations, right-click on VRIK header and select 'Guess Hand Orientations' from the context menu. More...
 
Vector3 palmToThumbAxis = Vector3.zero
 Local axis of the hand bone that points from the palm towards the thumb. Used for defining hand bone orientation If you have copied VRIK component from another avatar that has different bone orientations, right-click on VRIK header and select 'Guess Hand Orientations' from the context menu.. More...
 
float armLengthMlp = 1f
 Use this to make the arm shorter/longer. Works by displacement of hand and forearm localPosition. More...
 
AnimationCurve stretchCurve = new AnimationCurve()
 Evaluates stretching of the arm by target distance relative to arm length. Value at time 1 represents stretching amount at the point where distance to the target is equal to arm length. Value at time 2 represents stretching amount at the point where distance to the target is double the arm 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 elbow snapping (start stretching the arm slightly before target distance reaches arm 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 hand. Will be overwritten if target is assigned. More...
 
Quaternion IKRotation = Quaternion.identity
 Target rotation of the hand. Will be overwritten if target is assigned. More...
 
Vector3 bendDirection = Vector3.back
 The bending direction of the limb. Will be used if bendGoalWeight is greater than 0. Will be overwritten if bendGoal is assigned. More...
 
Vector3 handPositionOffset
 Position offset of the hand. Will be applied on top of hand target position and reset to Vector3.zero after each update. More...
 

Detailed Description

4-segmented analytic arm chain.