I am working on an isometric grid based game and im having an issue trying to link a mouse click from the user to a tile. I have been able to split the problem into 2 parts :
- Finding a rectangle that surrounds a tile (which I have been able to do)
- Figuring out from the rectangle which tile the click landed in (has got me stumped)
Here is an example of a rectangle with tiles on the inside:
The rectangle is 70px long and 30px high so if i use an input of say 30x(top)/20y(left) how would I go about determining which tile this fell into?