two_joint_ik
Functions
- computeInteriorAngle(a, b, c) ⇒
number
Compute interior angle between three points
- two_joint_ik(a, b, c, t, eps, a_gr, b_gr, a_lr, b_lr)
computeInteriorAngle(a, b, c) ⇒ number
Compute interior angle between three points
Kind: global function
Returns: number
- angle in radians
Param | Type |
---|---|
a | Vector3 |
b | Vector3 |
c | Vector3 |
two_joint_ik(a, b, c, t, eps, a_gr, b_gr, a_lr, b_lr)
Based on http://theorangeduck.com/page/simple-two-joint
Kind: global function
Param | Type | Description |
---|---|---|
a | Vector3 | Root bone position |
b | Vector3 | Second bone position |
c | Vector3 | Effector position |
t | Vector3 | Target position |
eps | number | EPSILON value, small value for rounding error compensation |
a_gr | Quaternion | Global rotation of root bone |
b_gr | Quaternion | Global rotation of second bone |
a_lr | Quaternion | local rotation for root bone, this will be updated as a result |
b_lr | Quaternion | local rotation for second bone, this will be updated as a result |