Box boundinBox not around box, error

Hi,

In my app I use the bounding boxes of some boxes, to draw my lines. Currently I experience a problem. I rotate my boxes in my world, and the boundingBox-es of these boxes sometimes aren’t in the correct place. I don’t understand why, because if I draw my boxes and their boundings, the boxes are in the right place, and the boundings no. See attached image. The bounding box that is marked with yellow is the bounding volume of the red box marked with the arrow.

Thank you!



P.S. I do simulation in my app. The next step after the one presented in the image below the boundingBox will be at correct place, and maybe another boundingVolume of another box will be in wrong place.



Do you by any chance move your boxes like getLocalTranslation().set()? Then that is wrong.

normen said:
Do you by any chance move your boxes like getLocalTranslation().set()? Then that is wrong.

The box is attached to a node, that I move, and the box will be moved with the node. That's how I do the movement:
[java]
Vector3f newTranslation = vertexNode.getLocalTranslation().mult(scaleFactor);
vertexNode.setLocalTranslation(newTranslation);
[/java]
If this is incorrect, then how?