Hi I am trying to add gizmo on the parent of the mesh selected.
Although it is working fine if the node has mesh but when it is just empty parent node i am not able to apply gizmo on it.
here is a playground example I created please have a look -
https://playground.babylonjs.com/#CR09RC
here you can un-comment the line 23, 24 to see it is working fine in that case but not in the case of alloys.
below is the screen shot of the hierarchy of the GLTF,
I also saw - Gizmos wont work on TransformNodes and are Bones TransformNodes?
But was not able to get my head around. Please suggest the right way
This should work now as @Cedric added support for TransformNode
Please wait for him to get back from vacations
Cedric
August 31, 2020, 2:12pm
4
Hi @nipundavid
Can you try with gizmoManager.attachableNodes
instead of gizmoManager.attachableMeshes
?
Naa, it didn’t work out I tried that with few other examples as well but I am not able to apply the gizmo on the transform node. please see the play ground example
Test 1 - Babylon.js Playground
Test 2 - https://playground.babylonjs.com/#CR09RC#2
Please share your thoughts
Cedric
September 4, 2020, 11:49am
6
There is an issue with parenting. I’ll take a closer look on that.
I’ve changed your PG with disabled parenting and it works but there is some offset. This offset might come from the .glb. Can you check if that the source scene has that offset?
https://playground.babylonjs.com/#CR09RC#3
1 Like
The offset might be because that the mesh is not where the root is
you can download the glb file from this link for testing
Thanks for looking into it, looking forward for the reply
1 Like
Cedric
September 8, 2020, 9:14am
8
PR is here : Gizmo parenting by CedricGuillemet · Pull Request #8896 · BabylonJS/Babylon.js · GitHub
it will fix the parenting issue when translating the node. But in your glb, as the local 0,0,0 is not properly placed, the gizmo will be aside your mesh.
3 Likes
Hi @Cedric ,
quick question - Is this feature available on react-babylon as well now? as I am using that in my project
Regards,
Nipun David
Cedric
September 23, 2020, 11:14am
10
I guess so. If gizmos are available then this one is as well