Just remember that each model should have it’s center point at its rotational axis, so when you rotate it along an axis it acts accordingly. For example a door has a central rotation at bottom left, a window at the top center maybe, whereas a person would rotate at the center bottom of its feet. And always apply rotations and scales in blender so they are at a rotational zero and 1:1 scale on import. If you do scale them in-game and don’t do that in blender, things get funky fast.
Those two steps are important and make life a Los less painful
Yes. And if you add the next “arm” as a child of that arm, it will follow it. Imagine 3 arms with a length xyz of (1, 10, 1) (the Y axis is UP in JME) - - a bit like your geometry pictured. The following code will add each arm as a child of the previous arm. Since children follow parents, it will behave as you expect.
// the "base" or "foot" of the crane of size (2, 2, 2).
Node base = new node("Foot");
Node arm1 = new Node("Arm 1");
arm1.setLocalTranslation(1, 2, 1); // set the first arm to the center-top of the base.
// the arms are a height of 10, so the location is easy enough...
Node arm2 = new Node("Arm 2");
arm2.setLocalTranslation(0, 10, 0); // set the second arm to the top of the first arm.
Node arm3 = new Node("Arm 3");
arm3.setLocalTranslation(0, 10, 0); // set the third arm to the top of the second arm.
Now when I rotate arm1, the other arms will follow it. When I rotate arm 1, arm2 and 3 will follow it. If I only rotate arm2, only its children will rotate (in this case arm3).
Finally, when you get to your “grabber”, add the “item” that is being grabbed as a child of the grabber, and it will follow the rotation/direction/location of its parents; the grabber, arms and the foot. Move the foot and everything will follow. Rotate the foot and all children will rotate with it. And so on…
This “in a nutshell” calculates the extents of the smallest cube size that can fit your object. The “size” variable gives you “half-sizes” because it is giving you the size of the cube from the centre.