PositionGizmo snapping not working as intended on larger meshes

For larger meshes the Position Gizmo does not really snap properly usnig snapDistance.

PG:
https://playground.babylonjs.com/#851PUZ#20

In this PG the snapDistance for the gizmo is set to 1, and the mesh has a scale of 10000.
The minimum distance I could get the mesh to move is 15, whereas I would expect it to be 1.

SnapDistance works perfectly fine for smaller meshes, but since I’m working with a largely scaled scene, this makes it a problem for me.

Not sure if this is intended behaviour, but having an incrementalSnap option similar to scaleGizmo would be nice.

Tagging @Cedric

OK, I’ll see what I can do this week :slight_smile:

2 Likes

I’ve checked and it not possible to have a 1 unit translation with this scale.
Moving just 1 pixel makes at least 4 world units.

That’s unfortunate. Is there anything I can do on my end to achieve 1 unit translation? Descaling my scene is not an option sadly…
Thanks!

add a button to move in 1 direction or user inputs for precise control.

1 Like