-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
World Coordinate System
yesfish edited this page Jan 8, 2015
·
11 revisions
World coordinates are independent from screen coordinates.
World coordinates don't begin at a set origin so use Map.Bounds if there is no reference point.
Location in the game world.
Distance from a WPos origin.
Offset from a WPos origin.
Three axis rotation with 1024 steps per axis.
Single axis rotation with 1024 steps.
Cell types are used to represent building footprints, unit paths, overlays and terrain information. Cells will typically contain one unit (or five infantry), although this isn't always the case.
Location on a grid.
To convert a CPos to WPos, multiply by 1024, then offset by 512.
CPos ( 0, 0 ) = WPos ( 512, 512 )
CPos ( 1, 2 ) = WPos ( 1536, 2560 )
Offset from a CPos origin.
Players ๐ฒ
- FAQ โ
- Installation ๐ฆ
- Game Content ๐ฟ
- Hotkeys and Stances ๐ฎ
- Strategies ๐
- Settings ๐ง
- Dedicated Server โพ
- RaspberryPi ๐
- Badges & Icons ๐ฅ
- Changelog ๐
Modders โ๏ธ
- Audio guide ๐
- Traits ๐
- Palettes and Remaps ๐จ
- World Coordinate System ๐
- Map scripting
- Lua-API ๐
- Conditions ๐
- Mapping ๐ง
- Pixelart ๐
Developers ๐ง
- Contributing โค๏ธ
- Compiling
- Hacking
- Coding Standard ๐
- Branches and Releases ๐
- Release Checklist โ
- Sequences
- Glossary
- Reverse engineering ๐
- License ยฉ๏ธ