How to show Gizmo at picked point on a mesh

In our tool, Gizmo is shown after user picks a mesh. After creating & on attaching gizmo to the mesh, we prefer to show the Gizmo at the user picked location.

Is there a way to specify an attach (anchor) position while attaching the Gizmo to a mesh?

Currently, I guess Gizmo’s location defaulted to mesh center. But, in some cases we noticed Gizmo is rendered totally outside the mesh. (may be it’s when the mesh center lies outside the mesh!)

I’m not sure it’s possible to offset the position of a gizmo (I had a quick look at the source code and could not find a way)…

@Cedric would know for sure, but he is currently on vacation, so you will need to wait a bit for the definitive answer.

1 Like

Gizmo’s location is at local mesh origin. If the origin is outside the mesh, the gizmo will display apart. To fix that, center your mesh in your DCC.

To have the gizmo at any location, you can create a transformNode at that particular location then parent the mesh to that transformNode. Moving the transform will also move the children.