Author Topic: Adding an Object3D to a bone  (Read 27270 times)

Offline idkm23

  • byte
  • *
  • Posts: 34
    • View Profile
Adding an Object3D to a bone
« on: March 17, 2016, 08:41:39 pm »
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.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Re: Adding an Object3D to a bone
« Reply #1 on: March 18, 2016, 11:42:01 am »
What about storing the individual joints with getJointByName(), then using the following method?

Code: [Select]
     public SimpleVector getJointPosition(Joint joint) {
SimpleVector location = skeletonPose.getGlobal(joint.getIndex()).getTranslation();
return location;