• 2D
  • Moving an object in an isometric grid

I have an object that I can drag around my scene but I want it to be snapping to an isometric grid, that I can define placeable spaces. If there is already an object in the same place or outside of the placeable tiles I want the object to be at the closest available space.

Any help is much appreciated, Thank you!

Thank you, it's a great start. However as I'm using an isometric grid the stepify doesn't quite fit. Do you have a formula for this?

Also how do I set exclusion zones for this so multiple objects don't stack up?

Many thanks

I don't know what you would do if the grid cells aren't all mathematically identical. I would find a way to make it identical. To see if something is there you could use areas and check for an overlap.