All Classes Namespaces Functions Variables Enumerations Properties Pages
Public Types | Public Member Functions | Public Attributes | List of all members
IKSolverLimb Class Reference

Extends IKSolverTrigonometric to add automatic bend and rotation modes. More...

Inheritance diagram for IKSolverLimb:
Inheritance graph
[legend]
Collaboration diagram for IKSolverLimb:
Collaboration graph
[legend]

Public Types

enum  BendModifier
 Automatic bend modes. More...
 

Public Member Functions

void MaintainRotation ()
 Used to record rotation of the last bone for one frame. If MaintainRotation is not called and maintainRotationWeight > 0, the solver will maintain the rotation of the last bone as it was before solving the IK. You will probably need this if you wanted to maintain the animated rotation of a foot despite of any other IK solver that manipulates its parents' rotation. So you would call MaintainRotation() in LateUpdate() after animation and before updating the Spine IK solver that would change the foot's rotation. More...
 
void MaintainBend ()
 If Auto Bend is on "Animation', MaintainBend() can be used to set the bend axis relative to the first bone's rotation. More...
 
- Public Member Functions inherited from IKSolverTrigonometric
void SetBendGoalPosition (Vector3 goalPosition, float weight)
 Sets the bend goal position. More...
 
void SetBendPlaneToCurrent ()
 Sets the bend plane to match current bone rotations. More...
 
void SetIKRotation (Quaternion rotation)
 Sets the IK rotation. More...
 
void SetIKRotationWeight (float weight)
 Sets the IK rotation weight. More...
 
Quaternion GetIKRotation ()
 Gets the IK rotation. More...
 
float GetIKRotationWeight ()
 Gets the IK rotation weight. More...
 
override IKSolver.Point[] GetPoints ()
 Gets all the points used by the solver. More...
 
override IKSolver.Point GetPoint (Transform transform)
 Gets the point with the specified Transform. More...
 
override void StoreDefaultLocalState ()
 Stores the default local state for the bones used by the solver. More...
 
override void FixTransforms ()
 Fixes all the Transforms used by the solver to their initial state. More...
 
override bool IsValid (ref string message)
 Determines whether this instance is valid or not. If returns false, also fills in an error message. More...
 
bool SetChain (Transform bone1, Transform bone2, Transform bone3, Transform root)
 Reinitiate the solver with new bone Transforms. More...
 
- Public Member Functions inherited from IKSolver
bool IsValid ()
 Determines whether this instance is valid or not. More...
 
void Initiate (Transform root)
 Initiate the solver with specified root Transform. Use only if this IKSolver is not a member of an IK component. More...
 
void Update ()
 Updates the IK solver. Use only if this IKSolver is not a member of an IK component or the IK component has been disabled and you intend to manually control the updating. More...
 
virtual Vector3 GetIKPosition ()
 Gets the IK position. NOTE: You are welcome to read IKPosition directly, this method is here only to match the Unity's built in IK API. More...
 
void SetIKPosition (Vector3 position)
 Sets the IK position. NOTE: You are welcome to set IKPosition directly, this method is here only to match the Unity's built in IK API. More...
 
float GetIKPositionWeight ()
 Gets the IK position weight. NOTE: You are welcome to read IKPositionWeight directly, this method is here only to match the Unity's built in IK API. More...
 
void SetIKPositionWeight (float weight)
 Sets the IK position weight. NOTE: You are welcome to set IKPositionWeight directly, this method is here only to match the Unity's built in IK API. More...
 
Transform GetRoot ()
 Gets the root Transform. More...
 
delegate void UpdateDelegate ()
 Delegates solver update events. More...
 
delegate void IterationDelegate (int i)
 Delegates solver iteration events. More...
 

Public Attributes

AvatarIKGoal goal
 The AvatarIKGoal of this solver. More...
 
BendModifier bendModifier
 Bend normal modifier. More...
 
float maintainRotationWeight
 Weight of maintaining the rotation of the third bone as it was before solving. More...
 
float bendModifierWeight = 1f
 Weight of bend normal modifier. More...
 
Transform bendGoal
 The bend goal Transform. More...
 
- Public Attributes inherited from IKSolverTrigonometric
Transform target
 The target Transform. More...
 
float IKRotationWeight = 1f
 The IK rotation weight (rotation of the last bone). More...
 
Quaternion IKRotation = Quaternion.identity
 The IK rotation target. More...
 
Vector3 bendNormal = Vector3.right
 The bend plane normal. More...
 
TrigonometricBone bone1 = new TrigonometricBone()
 The first bone (upper arm or thigh). More...
 
TrigonometricBone bone2 = new TrigonometricBone()
 The second bone (forearm or calf). More...
 
TrigonometricBone bone3 = new TrigonometricBone()
 The third bone (hand or foot). More...
 
- Public Attributes inherited from IKSolver
Vector3 IKPosition
 The IK position. More...
 
float IKPositionWeight = 1f
 The IK position weight or the master weight of the solver. More...
 
UpdateDelegate OnPreInitiate
 Called before initiating the solver. More...
 
UpdateDelegate OnPostInitiate
 Called after initiating the solver. More...
 
UpdateDelegate OnPreUpdate
 Called before updating. More...
 
UpdateDelegate OnPostUpdate
 Called after writing the solved pose More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IKSolverTrigonometric
static void Solve (Transform bone1, Transform bone2, Transform bone3, Vector3 targetPosition, Vector3 bendNormal, float weight)
 Solve the bone chain. More...
 
- Properties inherited from IKSolver
bool initiated [get, set]
 Gets a value indicating whether this IKSolver has successfully initiated. More...
 

Detailed Description

Extends IKSolverTrigonometric to add automatic bend and rotation modes.