SFML community forums
Help => General => Topic started by: sadin97 on September 05, 2017, 09:41:58 pm
-
I managed to make isometric map but I have problem on overriding sprites while selecting the certain tile.
I made isometric map from this 1 tile:
(http://i.imgur.com/qA7odsx.png)
I made something like this:
(http://i.imgur.com/0HL4GXx.png)
Which is the problem.
When I select one of blue tiles (and I clicked in area where is grey rectangular) program (mouse) detects all of tiles in that area.
Now, the question is how will I change this grid perspective and fix this problem.
I found some similiar questions on forum but couldn't fix this problem.
(http://i.imgur.com/ynSe0tF.png)
How to change "grid" or what it is called from yellow to green. So when I click desirable tile that and only that tile would be selected.
Thanks and sorry for my bad English.
-
You'll have to use math for isometric perspectives. It's quite a general problem, so there are many resources out there. SFML doesn't provide anything that will help you with that problem.
Here's what I got as first result when googling for "isometric math": http://clintbellanger.net/articles/isometric_math/