Closed kazimuth closed 9 years ago
The DFtoUnityCoordinate function returns a point at the bottom center of the block.
Both Unity and DF share the origin at 0,0,0
Unity uses y is up, and z is north. Unity uses Z is up, and y is South.
On Mon 27 Apr, 2015 2:17 am James Gilles notifications@github.com wrote:
I'm trying to implement block selection in Unity and I'm running into some issues figuring out how to translate between Unity coordinates and Dwarf Fortress coordinates. I was wondering if we could document some things in GameMap. Specific questions:
- What would a function mapping from a location in Unity-space to a map tile/block GameMap index look like? (specifically, to the coordinates of the 8 corners of the block?)
- What coordinate does DFtoUnityCoordinate return, relative to the cube that is a block (in the center of the top, I think?)
- How do the Unity origin and the Dwarf Fortress origin relate to each other?
— Reply to this email directly or view it on GitHub https://github.com/JapaMala/armok-vision/issues/8.
And is (0,0,0) the corner of a map block?
It's the bottom North West corner of the entire map.
On Tue 28 Apr, 2015 2:56 am James Gilles notifications@github.com wrote:
And is (0,0,0) the corner of a map block?
— Reply to this email directly or view it on GitHub https://github.com/JapaMala/armok-vision/issues/8#issuecomment-96826771.
Hopefully more documented now.
I'm trying to implement block selection in Unity and I'm running into some issues figuring out how to translate between Unity coordinates and Dwarf Fortress coordinates. I was wondering if we could document some things in GameMap. Specific questions: