

You can then use this point to collide with objects, etc. When the user clicks somewhere on the screen, simply translate that point from an isometric point back to a regular non-transformed point.Then you just draw it at that position, and you also rotate it by the isometric rotation amount. When something is drawn, its “real” position is translated to a viewed isometric position.To move something down, just add to its Y (or subtract, depending on your axes). In other words, to move something to the right, you just add to its X. All logic exists in a regular non-transformed space.The best way to think about an isometric game is this:

JAVA MOUSE COORDINATES OFFSET HOW TO
If you need to know how to do any of those functions listed above, just ask. Finally, subtract the offset so that we're back at (0,0). Now that we're back to normal, un-apply the pivot. Point.rotate(s(isometricRotation), -Math.sin(isometricRotation)) Unscale the Y position so it's back to grid proportions. Public Vector2 convertPointFromIsometric(Vector2 point) This is literally exactly the same except everything is done in reverse order and opposite operations. Converts the passed isometric point to a grid-based point. Now we want to go back to the top left corner (we don't want to start from the pivot). Typical isometric scales are 0.666 and 0.5. Scale the Y position so it looks like it's squished into the distance. Point.rotate(s(isometricRotation), Math.sin(isometricRotation)) If you call this function a lot, it's a good idea to You need to rotate from the center when applying the isometric transform. Now that the offset is applied, go from there to the center of the playing area. I only have this because there is a lot of wasted space with an isometric transformation. It's like transforming the origin on a graph.

This is the coordinate of the top-left usable space. Public Vector2 convertPointToIsometric(Vector2 point) Converts the passed grid-based point to an isometric point. In my isometric games I typically just have two public functions in my Level class (as the perspective might be different every level). I would really appreciate any help anyone can offer. I realize this question has been asked a few times but I cant understand the solutions I’ve found. This is the function I use to draw the Isometric map… It continues this until all the tiles are drawn. It then goes to the next row, which would be to the down and to the left of the previous tile and works its way down and to the right. I have a map thats 10 rows x 10 cols stored in an array and its gets drawn starting with 0,0 of the array at the top of the diamond then it draws from there going down and to the right.

I have been searching and trying for days and I cant seem to get anything going with this.
