1
\$\begingroup\$

I'm drawing a 3D stick figure for an Android app using Libgdx and its ModelBuilder's createCylinder() and createBox() methods. In the render method I animate it by applying translations and rotations to specific limbs (waving hello, kicking, etc).

While I have that all working, when I attempt to translate the whole figure to a new x y z position (by adding the current x's, y's, and z's by the delta of the new ones), the position of any limb that has rotation are off. It comes out looking like it entered a Star Trek transporter and came out disconnected on the other side. Look like it's been torn apart. Quite frightening.

I feel like there is a better way to draw a skeleton. Is there a way to associate all the body parts together? Almost like adding joints (knees, elbows, etc). Something that connects 2 shapes together, so that when one is translated, the other follows without having to manually do all the math on the other one? Or maybe some way of treating my all the shapes as 1 single model?

Is there a concept for this? If not, how is this type of thing often done (aside from using 3D modeling applications)?

Thanks

\$\endgroup\$
  • \$\begingroup\$ Apparently Ligdx uses scene2d, along with stage, actor, and group to do exactly as I describe but for 2d. Basically multiple models are associated together and become one model, so that all you do is one single translation and they all move. But I can't find out how to do the same thing in libgdx but in 3D. It must be supported, no? \$\endgroup\$ – Nullqwerty Jul 20 '16 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.