Bones - Skeletal and Pose Animations for jPCT/jPCT-AE > Bones

Adding an Object3D to a bone

(1/1)

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?


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

--- End code ---

Navigation

[0] Message Index

Go to full version