Unlinking a skeleton

I have a character with a skeleton that I load in to panda. He has no animations and I control all of his joints manually.

Take his knee for example.
Right now if i “dislocate” his knee, with a setPos on the knee only, the ankle and everything below the knee in the skeleton hierarchy will move along with it.

How would I unlink the joints (AFTER it’s set up initially) so that when I dislocate the knee, only the knee bone will move (but still with vertex skinning working) and the ankle and toes will stay where they were?

I’ve tried calling ControlJoint on all of the joints and reparenting them to the same root nodepath, but the link is still there behind the scenes…

I’ve also tried clearLocalTransform() and clearNetTransform() on the characterjoints along with removeLocal/NetTransform called with the parent node, but neither seems to do anything.

I know it’s somewhat of an odd question, but bare with me… :astonished:

So, you want the ankle joint not to be parented to the knee joint any more.

You can’t really do that at runtime. You can fake it, if you’re careful, by controlling both joints, and always composing the ankle joint by the inverse of whatever transform you apply to the knee joint.

But, you might be better off doing this as a preprocessing step. You can do this easily via egg-optchar, for instance–you can reparent the ankle joint to the root joint (or to the joint of your choosing), so that when you control the knee joint, it does not affect the ankle joint. In fact, you can completely break apart the skeleton this way, so that none of the joints affect any other. That way, when you take over the joint of your choosing at runtime, you will affect only that joint, and no other joints.

David

Another options would be to trick it.
Basically, have two time the same skeleton. One jointed and one disjointed…
parent them to the exact same parent and position. render only the one you need. This way you can disjoint when you need and keep jointed when you need.

I remember doing this for a dismemberment with Irrlicht.
I was replacing the sawn off member by a disjointed one with bloody textures…