How To Disable Editor Snapping - ruins Z coord?

Is there a way to disable position snapping in Scene View.
Right now unity snaps all coordinates to 0.1, 0.01, 0.001 depending on the scene zoom.
And what is awful - it snaps Z coordinate even if I don’t drag Z-axis at all. So it ruins all my manually set Z-coords.

I have all the snapping options disabled, and I’m not holding any of the Ctrl or V keys.

Is there a way to make Unity not spoil my Z-coord when I’m not touching it?

2 Likes

Go to Edit > Snap Settings

Are they all set to 1?

1921719--124076--Screen Shot 2015-01-15 at 13.13.42.png

Yes, they all are set to 1. And I’m not holding Ctrl key for snapping.

I’ve noticed that snapping values depend on camera zoom - if you zoom in Scene View, this “snapping value” changes from 0.1 to 0.01, 0.001 and so on.

I could live with that, but the problem is, that snapping applies to Z coord even if I use only XY-axis gizmo. This could not be a problem for a 3D game, but I’m working on 2D, where Z axis has a special meaning (like render layer). I set Z coord manually and it gets very annoying, when it resets after I move an object in XY plane.

I’m seeing something that I think is related… but I think it’s new behavior or maybe a bug. The snap settings shouldn’t matter, as long as you aren’t holding down control (Windows), but I even tried setting them all to 0.0001 but doesn’t help.

When I move an object using the move tool (the one with the red + yellow arrow, 2D view), it snaps one of the cords to the nearest whole number – even if I’m not moving in that direction. It only happens with transforms that are nested a few levels (child of child of child, and deeper).

Or maybe some other setting of my just got toggled? Whatever it is, it is very annoying, and I don’t ever remember seeing it in my 2 years of working with Unity. As it stands I have to type all my cords in manually, to lay out my scene.

Yes, this behavior was introduced relatively recently. And it depends on scene zoom. The more you zoom in, the smaller snapping is.

But the real problem is that it modifies the coordinates even if you don’t drag the respective handle.

I’ve the same problem. Now it’s a pain to make a 2D scenery :frowning:

Sounds like we should file a bug report… I might do it later, a little burned out and upset with Unity right now though, because I’m trying to create custom 2D character controller… and if you have ever done that, you’ll know what I mean (lack of decent collision detection, casting, overlap checking, etc).

Same problem with positioning meshes. When zoomed out, the editor loses accuracy. Positions are rounded up, even when not moving that axis. Same problem when snapping to vertex as well. Using version 4.6.6.2f.

Extremely frustrating and adding so much time to my project. I am going back and zooming in to each piece and realigning to it’s neighbor. Any time I want to rejig the level a bit I have to go back over every piece again.

Noticed the same problem here. It keeps snapping Z in 1 unit steps.
This bug came out of nowhere - everything was working fine before.

5.1.3p1

Editor restart didn’t help. Neither did changing snap settings to smaller values than 1. X and Y are fine. Z is broken.

After second restart I deleted the prefab that was acting strange from the scene and dragged a new instance from the project folder into the scene.
That helped to get rid of the weird behaviour - for now.

Ok so I have just bumped into this issue as well. Similar behaviour (snaps only child objects and only in 1 direction). What I have noticed though, is that the PARENT OBJECT’S scale was set to -1 on X axis, which caused all children’s X coordinates to be snapped to nearest integer. Just make sure your parent object scale is not -1 and you should be good. Hope that helps :slight_smile: John

Noticed that also, but wish they would just fix this, because sometimes using -1 is the best way to flip a 2D object, and kind of a pain to flip it, make your changes, then flip it back… I mean, the point of a visual editor is to be able to do things visually, otherwise we’d just do everything in code :slight_smile:

We can’t fix a problem without a bug report.

If you have reported it, please post the number here so we can have a look.

732274

Thanks! I can track this in our bug system now.

I was having this same problem some time ago. After some digging, I found out it happened because the object I was dragging was child of a parent which had negative scale.
The object was being dragged in whole increments only on the (surprise!) axis which was negative. The other axes worked fine.

So the lesson is: do not use negative scale :slight_smile:

In retrospect this is obvious, but you can also run into this problem if the Game Object you’re moving is a child of a Grid component.

My issue was this button being enabled:

5 Likes

Thanks that really helped

I have this same issue in Unity 2022 even with grid snapping disabled. I move an object on one axis, and the other axes round to 2, 3 or 4 decimal places based on scene zoom.

My fix is to enable grid snapping and set the increments to 0.000001. Now my objects at positions like 18.47355 don’t round to 18.47 anymore when I moved them along another axis.