The mouse position is already in Isometric space, you need to translate that back to orthographic space to determine the click point. I have 3 functions that I use in my engine for this.
public static Point isoToCoarseWorld(Point isoPoint, Point viewportOrigin, Dimension isoDims) {
int xOrg = viewportOrigin.x + (isoDims.width >> 1);
int yOrg = viewportOrigin.y;
int i = (int)Math.floor(((isoPoint.y - yOrg)/(double)isoDims.height
+ (isoPoint.x - xOrg)/(double)isoDims.width) * 32);
int j = (int)Math.floor(((isoPoint.y - yOrg)/(double)isoDims.height
- (isoPoint.x - xOrg)/(double)isoDims.width) * 32);
return new Point(i, j);
}
public static Point coarseWorldToTile(Point coarseWorldPoint, Dimension worldTileDims) {
return new Point((int)Math.floor(coarseWorldPoint.x / worldTileDims.width)
,(int)Math.floor(coarseWorldPoint.y / worldTileDims.height));
}
public static Point coarseWorldToTileFine(Point coarseWorldPoint, Dimension worldTileDims) {
return new Point((coarseWorldPoint.x % worldTileDims.width)
,(coarseWorldPoint.y % worldTileDims.height));
}
Where the worldTileDims are 32x32 and the isoDims are 64x32. isoToCoarseWorld takes an isometric point and converts it into raw orthographic space. The other two functions are used to determine which tile that raw point is in, and the offset within the tile respectively.
When working out any path finding or logic, you should be working in orthographic space. Isometric space is only used for viewing. I think this is what you were asking about. If not could you clarify a bit?