1
Support / Re: having problem in finding tile coordinates through mouse cursor
« on: January 03, 2014, 05:42:17 am »
it's ortho and 1 cam
Thank you I finally got it working but I'm completely didnt know what I did, and for some reason this line :
tilemap.GetTileAtPosition(tk2dCamera.Instance.camera.ScreenToWorldPoint(e.mousePosition), out xx, out yy);
The yy var gives the inverted position of Y axis, so I have to add * -1 on that part and it's works good now. So im sure it has to do with the camera?
Are you using a perspective / ortho camera? Do you have more than one camera in the scene?
Thank you I finally got it working but I'm completely didnt know what I did, and for some reason this line :
tilemap.GetTileAtPosition(tk2dCamera.Instance.camera.ScreenToWorldPoint(e.mousePosition), out xx, out yy);
The yy var gives the inverted position of Y axis, so I have to add * -1 on that part and it's works good now. So im sure it has to do with the camera?