Hi… Created a character in Maya. Rigged it (Quick Rig + Skinned). Imports FBX into three.js successfully.
I need to rotate the arms by code.
I can see that the bones are already included in the import. And I can also traverse the imported object (isBone) and get the bone info (name, position, and Euler rotation). But I’m lost on how to hook this up so when I drag the gui slider it rotates a particular bone. (No problem getting value from the gui, just how this value can drive the rotation of imported rigged character)
Experimented for a few days and haven’t advanced. Maybe I don’t understand how to convert this already exiting bone and skinned character into a three.js “skeleton” for manipulating the rotation of the bones?
I know it’s straight forward to play animations imported with the fbx and skeleton, but that is not an option here. Help and guidance appreciated.
Maybe you can use the following fiddle for your project. It shows how to animate the arm of a glTF model in the animation loop. It actually does not matter that the model is loaded via GLTFLoader. The interesting part is the selection of the bone and the respective animation.
Thank you so much @Mugen87! Can you please add me know how we attach a TransformControls to that right arm? I just want to move it up and down in one direction.
How can I enable a TransformControls marker to move the bones with respect to the position? Using the same technique, is it possible move the soldier limbs?