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

Positioning and orienting Object3D with a Bones joint?



I'm interested in dynamically adding an Object3D to the world and positioning/orienting it relative to a particular Bones Joint in an Animated3D.   

For example - to place an dynamically created object in the hand of a model, and keeping it aligned with the hand as it moves/rotates.  (Or a hat on the head of a model, which will stay on the head, regardless of how the model animates.) 

Any tips for getting the position and rotation to use with either Object3D.setTranslationMatrix(), setRotationMatrix(), or using Object3D.translate(x,y,z) / rotateX(), rotateY(), rotateZ() / rotateAxis() ? 

The Object3D to "attach" could either be a sibling of the Animated3D root, or a child.

Any code samples would be appreciated.  Thanks!

have a look at source code of SkeletonDebugger, it does sth similar to your case, positions "joint" and "bone" objects according to where joint actually is.


[0] Message Index

Go to full version