BoundingBoxGizmo attach to child node with a wrong boundingBox

First:
drag rotation sphere to rotate duck.
Second:
click duck,then it will append gizmo to child node.

Desired result:
boundingGizmo will flow the mesh rotate.
If we close preserveScaling,it will be correct.https://playground.babylonjs.com/#YIU90M#810

Huh. But scaling is already not preserved in the first PG. Plus I get all sort of other issues in this version, if I start by zooming the camera. In some case, the mesh would even go completely haywire.
And the second PG seems to work fine and also has scaling. So in the end, I guess my question is: What is your issue with your second PG?

The first PG with Gizmo.PreserveScaling = true.Then it works uncorrectly.
But if i set Gizmo.PreserveScaling = false.Gizmo works correctly.(The second PG)

Yes but how is this an issue or a bug? It is said that the default is off. There must be some reason for it.

Like @mawa said,in the first PG.We rotation gizmo firstly.Then click the duck repeatedly,we will get all sort of other issues.

In my product,i should set preserveScaling true to make sure that the mesh position,rotation and scaling is correct.

I see. So I guess its time to return to this once more because obviously, it doesn’t work . Hopefully, you’ll get a positive reaction from the people in charge. @cedric may be ? Meanwhile, have a great day,

1 Like

Thanks for your reply,have a great day too. :heart:

It seems like a big question,i think that it is time that we need to review this part of the function.

I was just questionning myself about this weird artefacts and decided to quickly give it another look.
Turned out with this:

Is it just an illusion or would you say this (sort of) works?

1 Like

Like blender 3D editor.It has a mesh list,and we can select mesh then the mesh instance in scene will attach to a gizmo.
PG is an example that reproduce the problem quickly.It will has some mistakes when i take BJS to develop an 3D editor.

I find that when i click the child mesh to change attachedMesh.It will invoke _attchedNodeChanged.But when it restores the attachedMesh parentNode,the attachedMesh worldMatrix is uncorrect.

cc @Cedric

It can be easier to reproduce the problem.When attach to child node,rotate sphere’s behavior has some mistakes.

you should only use meshes in the boundingBox gizmo, but even though it looks like the rotation is broken. @Cedric might be able to help soon with it.

1 Like

Yes, this is weird. I’m adding this issue to my todo list.

2 Likes