Skip to main content

two_joint_ik

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