Hello Guest

Author Topic: Tilemap - [0,0] bottom left origin but need [0,0] to be top left of tilemap  (Read 4094 times)

sabba2u

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
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?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
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.