Game Development Community

How to find on what tile a point is on a rotated tilemap?

by Diego Santos Leao - GameBlox Studio · in Torque X 2D · 12/19/2008 (2:12 pm) · 1 replies

I want to be able to identity on what tile my cursor (a little image) is touching on a rotated tilemap, but the "PickTile" is ignoring the rotation... Everything works fine without rotation... Any advice?

I thinking that maybe the rotation shouldn't be that from the TX Builder but an internal one... On one of the matrix methods... Is that a possible solution? Thanks!

#1
12/19/2008 (4:51 pm)
From what I can tell, tilemap.PickTile(Vector2) should work since it gives you back the tile at specific world coordinates which should take into account rotation.

If it's not, could you give an example of what you are doing?