Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Tilemap - [0,0] bottom left origin but need [0,0] to be top left of tilemap
« previous
next »
Print
Pages: [
1
]
Author
Topic: Tilemap - [0,0] bottom left origin but need [0,0] to be top left of tilemap (Read 4912 times)
sabba2u
2D Toolkit
Newbie
Posts: 4
Tilemap - [0,0] bottom left origin but need [0,0] to be top left of tilemap
«
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?
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: Tilemap - [0,0] bottom left origin but need [0,0] to be top left of tilemap
«
Reply #1 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.
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Tilemap - [0,0] bottom left origin but need [0,0] to be top left of tilemap