This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
coordinate [2017/05/29 13:59] – created justin | coordinate [2017/05/29 14:50] – justin | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- | ---- | ||
- | A **coordinate** is a scripting data type that represents a 3D position within | + | A **coordinate** is a scripting data type that represents a 3D position within |
====Example: | ====Example: | ||
<code lua> | <code lua> | ||
- | coord[-5, 2, 10] | + | coord[3, -2, 10] |
</ | </ | ||
+ | |||
+ | The example above represents the position 3 tiles to the east, 2 tiles to the north, and 10 voxels above the center of the map, or more specifically at the base of the tile with coordinate (3, -2, 10) as displayed in the Map Editor. | ||
+ | |||
+ | In certain cases (for example when supplied to the [[Move Camera]] and [[Look At Target]] functions and their variations), | ||
+ | |||
+ | ====Example: | ||
+ | <code lua> | ||
+ | coord[0.5, 0.5, 24] | ||
+ | </ | ||
+ | |||
+ | Using the example above as a destination for the [[Move Camera]] function would place the camera at a height of 24 voxels above the southeast corner of the map's center tile (i.e. tile (0, 0, 0)). | ||
+ | |||
+ | ~~NOTOC~~ |