2D Toolkit Forum

2D Toolkit => Support => Topic started by: sabba2u on July 30, 2013, 04:26:12 am

Title: Tilemap - [0,0] bottom left origin but need [0,0] to be top left of tilemap
Post by: sabba2u on July 30, 2013, 04:26:12 am
Hello,

Tilemaps have their origin point [0,0] at the bottom left of the tilemap, is there any way to have the origin point be at the top left - so that it matches the way an array is laid out?  If not, what is the best solution?
Title: Re: Tilemap - [0,0] bottom left origin but need [0,0] to be top left of tilemap
Post by: unikronsoftware on July 30, 2013, 10:42:37 am
The tilemaps have the origin at 0, 0 = bottom left following the Unity coordinate system. If you want to start from the top left, all you need to do is use y = height - 1 - yourY in your code to convert between the coordinate systems.