Using spherical nodes, cylindrical bones, and cone torsion constraints, I managed to create a simple skeleton in three dimensions. I use the response part of the bullet physics library (physijs by @chandlerprall, along with threejs).
Now I would like to add muscle. I have been trying for the last two days to get some kind of sliding constraint or general 6-DOF constraint to make the muscle contract and pull its two nodes to each other.
I get all the crazy results, and I'm starting to think that I'm going to do it wrong. I don’t think that I can just use the two restrictions of the torsion of the cone and then scale the muscle along its axis of length, because scaling the collision grids is apparently quite expensive.
All I need is a “muscle” that can join two nodes and a “contract” to pull out both of its nodes.
Can someone give some advice on how I could best approach this using the bullet mechanism (or, indeed, any physical engine)?
EDIT: What if I don’t need muscle collisions? Say I just need a visual muscle that is bounded by two nodes:
These two nodes are linearly bounded by a muscle collision grid, which, instead of being a large mesh, is just a small one that exists only to keep the visual muscle geometry in place and provide an axis for the nodes to be limited.
, . - - ? , , , ...