- Home /
Prevent Inconsistent Snapping
I've been making a game with levels that are tile based. So when I'm constructing the level, I'm usually just duplicating things and moving them around with the Cmd (or Ctrl for Win) so it snaps to the grid. Often while I'm editing I all of a sudden realize that some of my bricks are off a small amount (like 0.02) for some reason and I didn't know why. Then I realized today when I was editing that if I'm zoomed out further when I'm moving tiles around with the Cmd button held down, it moves and snaps to a different coordinate than if I was zoomed in. This is really troublesome when I need to zoom out, highlight, and move a bunch of tiles at the same time. Is there a way to fix this behavior or is there a better way for me to do this?
Try as I might, I couldn't reproduce what you're saying is happening. I zoomed out really far, zoomed in close, grabbed 1 object, grabbed lots of objects, and every combination in between and it still snapped exactly where it was suppose to.
The only thing I could possibly think of is that you might accidentally be nudging the object and not realizing. Or the object started at 1.2 or whatever and when you held ctrl/cmd it went to 2.2 and so on since it only goes up 1 unit exactly. So if it started not as a whole number it will continue to not be a whole number.
It's either that, you changed a setting somewhere, or your unity is bugged out. You can check the settings by going to Edit > Snap Settings. It should have $$anonymous$$ove X/Y/Z set to 1 each, scale set to 0.1 and rotation set to 15.
Answer by tropercase · Jun 30, 2016 at 05:14 PM
I get the exact same issue. It was worse when I had objects parented to empty objects with precise position values (which I had just done arbitrarily and rectified by making those parent objects have a 0,0,0 position), but even now, same thing. If it's zoomed in a lot, it's precise to 3 decimal values. Zoomed in less, precise to 2 decimal values. Zoomed in less, precise to only 1 value.
It's baffles me why it does this and hopefully the devs will look at this and similar topics and hammer out a fix for it one day.
Suggested solution in the meantime: say you want to move it forward by 30 units. You can add "+30" to the position x value to do this quickly. Once you press enter\return or click elsewhere, the addition or subtraction will be applied automatically.
Answer by abczac123 · Mar 09, 2020 at 08:19 AM
Same issue here. Appears to only happen when you aren't zoomed in.
I'm using 0.0625 as the ctrl increment snap and it always ends up rounding while zoomed out more than a few units.
Such a pain, would love a fix or workaround.