kept playing around with GizmoManager (a really cool thingy btw).
I need a special behaviour of GizmoManager as follows:
I´ve two meshes a and b where b is child of a.
When I move a, b is supposed to move accordingly.
When I move b, only b moves but not its parent a.
Reading the API I came across onAttachedToMeshObservable but I don´t know what to do with it to
fullfil my needs. Basically I don´t know how to get the “current mesh” from GizmoManager.
My idea is to check:
if a mesh is a child mesh --> dispose.child
if a mesh is a parent mesh --> add.child
by getting parent-child-relations out of meshes names for example.
In my case there´s only one parent-cild-relation (only one level).
Every child has one parent, every parent can have several children.
Scenario is a conveyor and its light sensors.
I need to able to move conveyor and its sensors as well as single sensors along a conveyor´s axis.
If there´s a more elegant way, please let me know.
I startet a small PG here: https://www.babylonjs-playground.com/#6U08E0#9
Any help appreciated.
Thanks guys, Topper