mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-23 00:23:46 +00:00
Required changes for Inverse Kinematics
Added a * operator compute from to -> adds safeties around shortestArc conjugate -> reverses the xyz of the quaternion IK Solver commit Added: IKChain struct to tsshape commands to tsshapeconstruct to create and setup ikchains ik solvers -> ccd and fabrik, these are in their own file tsIKSolver TODO: there needs to be some tooling added to the shape editor for this
This commit is contained in:
parent
42e8687067
commit
9866908e99
10 changed files with 1048 additions and 1 deletions
|
|
@ -866,8 +866,21 @@ void TSShapeInstance::animate(S32 dl)
|
|||
|
||||
// animate nodes?
|
||||
if (dirtyFlags & TransformDirty)
|
||||
{
|
||||
animateNodes(ss);
|
||||
|
||||
//---------------------------------------
|
||||
// TODO: Implement different ik methods
|
||||
// add limits to ik chain nodes
|
||||
// cache bone lengths.
|
||||
//---------------------------------------
|
||||
for (U32 i = 0; i < mShape->ikChains.size(); i++)
|
||||
{
|
||||
if (mShape->ikChains[i].enabled)
|
||||
solveCCD(mShape->ikChains[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// animate objects?
|
||||
if (dirtyFlags & VisDirty)
|
||||
animateVisibility(ss);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue