Moving an object in an isometric grid

CauseTripodCauseTripod Posts: 13Member
in 2D

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!


Tags :

Comments

  • fire7sidefire7side Posts: 864Member

    This tutorial might help.

  • CauseTripodCauseTripod Posts: 13Member

    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

  • fire7sidefire7side Posts: 864Member

    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.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file