There are a couple of things that are not clear to me:
-
I believe we should not be substituting both values in snapPos with the gridSize. It seems more logical that we should divide by 10, round to closest integer and then multiply by the grid size we want.
-
If I translate a cube and THEN modify the gridSize range slider, my cube moves back. How can I make it so that the slider does not influence the new position when changed again?