Mesh misaligned caused by rotate & explosion

I have a model of a theodolite with three telescopes on top that rotate as a whole around a world axis, at the same time, the whole model rotates around its own Y-axis. Kind like the picture below, I could not post my real model here cause it is confidential.


When it rotates, I change the explosion property by new BABYLON.MeshExploder(meshes, meshes[1]).explode(value), then restore it to 0, and find that the three telescopes are misaligned, both vertically and horizontally.

Here is my PG: mesh misaligned caused by rotate & explosion | Babylon.js Playground (
I tried to reproduce my problem in the PG, but could not do it 100% because my model is confidential and I had to use a similar model. However, I found two similar problems in the PG, after the explosion and restoration: 1. The rotation radius of the telescope changes. 2. The coordinate axis also becomes misaligned, as shown in the picture below.

With problem:

I would like to ask for advice on how to solve this problem. Thank you!

You must reset the rotation of your rotating gear each time before exploding the mesh, to ensure that you restart with the same orientation :


Thank you for your reply. It did solve the problem in pg, but it didn’t solve the problem in my actual project. In my project, the positions of the three telescopes also change, for example, from 0, 0, 0 to 1, 1, 1. How can I solve this problem?

You should save the initial positions and reset them before calling explode. Something like that:

1 Like

Thank you for your reply. I have tried it before my last reply, but it still didn’t solve my problem. There are still misalignments. I plan to clone a model and separate the explosion and rotation steps into two separate models to display them.

If I can 100% reproduce my problem on PG in the future, I will come back to ask for help again. Thank you!