Gizmo use tmpParent but do not preserve scaling sign

Hi @Cedric ,there are some new problems.
The node setParent to the parent which with negative scaling,when it add gizmo and something strange happens.
With gizmo:

Withouth gizmo:

I think the above problem related to SceneLoader.ImportMesh.If it do not preserveScaling while build the meshes structure,and it will have the same result but not the correct properties.Like the above question that i asked about why it do not keep scaling sign.

I’ll take a look at this issue in the coming days.

1 Like

Same as previously, second parameter to setParent is used to preserve scaling. Once set to true, it behaves more like expected.

Sorry to reply you so late,i’ve been too busy.
Yes,in the PG,we can setParent with second param.But if we use SceneLoader to import a glb that with multi-level child nodes.We attach the gizmo to the child node,the gizmo mesh is not correct.
PG:
attach to duck(rootNode):

attach to node0(duck’s childNode):

@Cedric will be back in a couple weeks after a well deserved break. He ll be able to look as soon as he ll be back :slight_smile:

1 Like

I found that it cause by this.

Because the duck node is mesh and the node0 is transformNode.
But it is strange,thounth we said that boundingBoxGizmo can only use in mesh.But like the PG,we can use attachedNode to attach it to transformNode.
I think that we can refactor the gizmo,and we do not need limit what type of node can we use to.

PR

2 Likes

Can we allow all type node to updateGizmoRotationToMatchAttachedMesh.Because we allow all type node attach to boundingBoxGizmo.But we has a warning.

Fixed BBox with this PR:

1 Like