Set Custom Gizmo's Position

Hi! I want to put the custom gizmo at the top of the tree. I dug into gizmo but couldn’t find where I can find a clue to adjust the gizmo’s y position in order to put it at the top of the tree.
I tried to use the tree’s leaves boundingBox info. (centerWorld, maximumWorld) but was not really successful. As you can see in the console(code line 115, 141) maximumWorld.y doesn’t return consistent value… I think I’ve missed something here…

Would you mind helping me here?

Thanks in advance,

cc @Cedric the Gizmo Guru :slight_smile:

I would add a TransformNode and place it at the top of the tree using boundingbox infos.
Then, use on DragOversable to set the scaling from the TransformNode to the tree.

Hi @Cedric

I thought I appended the right link for the pg. but it looks like the current pg link is outdated.
This is the most updated one:
I tried the similar way you mentioned. but the problem is that the boundingBox info seemed to return different value for the first time(line 115, 141). it is not placed at the top of the tree. Am I missing something here?

You can add these lines to refresh the bounding volumes:


Did you try to use the leaves mesh instead of the tree transformNode?

yes~ I used the leaves mesh instead of tree transformNode.

Update! I just added a mesh as a handle to a tree. Made it invisible and attached the gizmo and used the scaling factor of the handle mesh and applied it to the leaves. It’s not working as exactly as I wanted (being dragged part) but the attaching/placing the gizmo itself is working as I wanted! I’m not sure this is a good practice though :sweat_smile:

Thanks, @Cedric @sebavan !!


Once thing to try as well is to use a simple mesh drag behavior and then compute a scaling factor from current position and origin position.

1 Like