- Home /
Auto-rounding positions of game objects dragged into scene
I am trying to make a 2D-platformer game and I need to drag a lot of sprite tiles into the scene as platforms, grounds etc. However for each tile I drag into the scene, I need to manually change its x and y positions from the inspector.
For example when I drag one tile into the scene that I want it to be at position (2, 5, 0), I can adjust the position while dragging it to be as close to (2, 5, 0) as possible but I can never get to that exact position and so I have to round off the positions manually from the inspector.
Is there a way to set up Unity to round off the positions to like the nearest whole number automatically when I drag the sprite tiles into the scene?
Answer by NorthStar79 · Sep 19, 2017 at 01:07 PM
you can use snapping tool for this. moving an object while pressing down Control Key will only move them certain distances per apply.
also, one more tip, if you press "V" key, you can select any vertex and snap it easily with any other vertex (very useful when level designing)
Yes! This makes designing the level very easy and quick. Thank you!
Your answer
Follow this Question
Related Questions
Is there an easy way to accurately position objects in the world ? 1 Answer
How can I find adjacent 2D tiles without using colliders? 3 Answers
How do I instantiate an object to a rounded position? 2 Answers
How do I link Position and Scale? 2 Answers
How do I drop a GameObject on top of Grid/mesh's Vector3 coordinates? 0 Answers