✅ Isometric conversion and inverse conversion has some sort of weird distortion.

Hi all, I just started throwing together an isometric game in Unity and made a point of using pure 2D w/ sprites rather than a 3D environment with an orthographic camera at an isometric angle. I'm currently just starting out with the basics: taking a Cartesian coordinate and converting it into an isometric coordinate and backwards.

I can spawn a grid of tiles with a given width and size ratio (so this isn't strictly isometric, as my tile sprites are a bit steeper than the expected 30 degree angle). However, when I use my inverse transformation method to figure out which tile the mouse is hovering over, I notice a strange distortion that seems to increase the further away I get from the center of the screen. I've tested this with properly isometric tiles and it still failed to work, so I believe the error doesn't come from the fact that the tiles are dimetric.

My conversion methods can be found here. https://pastebin.com/uxDJJQj1
In case it becomes relevant, the code for testing the hovered tile is here. https://pastebin.com/rEnQVD2x
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Was this page helpful?