Adding an Object3D to a bone

Started by idkm23, March 17, 2016, 08:41:39 PM

Previous topic - Next topic

idkm23

My question is simple: How would I add an object3D to a bone? I am making bounding boxes around the limbs of ONE model&skeleton to create collisions between the limbs of the model (so for example the arm cant phase into the torso). I made a box that surrounds the arm (in the base pose), but now I want the box to follow the arm wherever it is. I basically want the vertices to be attached to the bone just like the mesh. Any ideas are appreciated, thanks.

AGP

What about storing the individual joints with getJointByName(), then using the following method?


     public SimpleVector getJointPosition(Joint joint) {
SimpleVector location = skeletonPose.getGlobal(joint.getIndex()).getTranslation();
location.matMul(model.get(0).getWorldTransformation());
return location;
     }