Skip to main content

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)

Based on http://theorangeduck.com/page/simple-two-joint

computeInteriorAngle(a, b, c) ⇒ number

Compute interior angle between three points

Kind: global function
Returns: number - angle in radians

ParamType
aVector3
bVector3
cVector3

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

ParamTypeDescription
aVector3Root bone position
bVector3Second bone position
cVector3Effector position
tVector3Target position
epsnumberEPSILON value, small value for rounding error compensation
a_grQuaternionGlobal rotation of root bone
b_grQuaternionGlobal rotation of second bone
a_lrQuaternionlocal rotation for root bone, this will be updated as a result
b_lrQuaternionlocal rotation for second bone, this will be updated as a result