GizmoManager cause child's index change

I have a group contains 10 mesh,[m1,m2,m3,m4,m5…,m9,m10];
I create a line based on their position attribute,
then i change their position/rotation by GizmoManager,the GizmoManager worked well;
after that,i want to update the line,

but,if i change rotation by GizmoManager, the child’s index changed,it just like,
i change m3’s rotation,then i get the mesh’position again:

group.getChildren().forEach(point=>{
linePoint.push(it.position.clone())
})

this time,the order change!
[m1,m2,m4,m5,m6…m9,m10,m3]
so,my line messed up

捕获55555

if i only change m3’s position by GizmoManager,it is ok

who knows why?thanks

Welcome aboard!

Pinging @Cedric who is the gizmo master. Also, providing a repro in https://playground.babylonjs.com/ would help I think.

I second @Evgeni_Popov for a playground.
Also, if you get check the hierarchy in the inspector, does the children order change?
Can you also try to get the list of meshes with gizmoManager.attachableMeshes ?

i created a demo for this,
Maybe you can see the problem,
thanks

I tried it for v-5.0.0,the bug disappear,so i should update my babylon’s version

2 Likes