Hi, I am wokring on 2.5D game - I don't want to achieve a lot, just working map system and animations, this will satisfy me.
I am using SFML.
So I started today and I downloaded some free isometric title sets.
My sample title looks like that:
Actual size of title is 54x27
Its 54x54 PNG. So i loaded it, created mask for it so background will be transparent and I started playing with layout, trying to figure out how to connect next titles - acomplished that.
My problem is that I can't get mouse to identify each title because I can't find better way than checking if mouse coordinates are inside range.
For example I place that image at 0.0, using mask and then checking if mouse's x is > 0 and < 54 and mouse's y > 27 and < 40. And because of this method code goes all crazy because it thinks that for example lower left corner is also a part of actual title.
Can somebody tell me proper way to identify titles in isometric world?