Make a square with clickable sides

I want to make a square element which is a basic tile in a top down game (like a tile that lights up at a disco).

The intention is that each side of the square be clickable and influence the direction of facing for the sprite. How to make each side individually clickable?

We use setinteractive to make the whole element clickable but one about one edge itself?

You can use the localX and localY arguments to GAMEOBJECT_POINTER_DOWN to figure out where it was clicked.

Or you could use 4 interactive Zone game objects placed on the edges.

1 Like