I am making a sort of "Dont Starve" game and I'm having trouble finding an object in a position.
I want to do this because I want to adjust a "wall" sprite's image with its corresponding position.
e.g.
A B C
D E F
G H I
In the above, the A position should be a south-east (r) shaped wall.
The B position should be a south-east-west (T) shaped wall.
The E position should be a north-south-east-west (+) shaped wall.
and etc . . .
I made all the versions of the wall as an animation so I just change the animation of an object to change the shape.
The problem is, I can't find a way to find out if there are existing wall objects in the North, South, East, and West position of a newly placed wall.
I need to find out if there are other walls so that I can set the new wall and the existing surrounding walls to the proper shape.
Any tips?