- Home /
Question by
pjslauta · Aug 09, 2020 at 03:53 AM ·
positiontilemapclickworldspacescreenspace
How can I determine what tile I'm clicking on
I'm working on an Isometric XYZ tile game. I am generating all the tiles from sprites at runtime. They do not have colliders attached. I'm trying to determine which tile a player is clicking on using Input.mousePosition. I have tried a ton of math, and nothing seems to work right. As I move away from the origin of the map (WorldPosition 0,0) my error increases. I have tried applying the math found in isometric tutorials and haven't gotten anywhere. There must be a way to do this, can anyone help?
Comment