Entity space and coordinates

Although this is a 2D game engine, entities use three-dimensional positioning system. The world-space coordinates on Ethanon Engine are similar to regular 2D screen projection.

Scene origin is at the upper left corner of the screen, the X-axis points to the right and the Y-axis points downwards. There is also a Z-axis that points upwards by default, it produces an impression that the entity is floating because of viewer's perspective.

Every vertical entity must have its origin at the center that symbolically represents its bottom side, as shown below:

The origin of an entity may be manually and visually adjusted in the Entity Editor in case it doesn't initially match the right spot (Pivot adjust).

  • Pivot adjust properties may be used to fix entity origin according to the source sprite.

For a regular top-view game style, horizontal entities (the floor/ground) will lay on the XY-plane and only "floating" entities should have their Z position greater than 0. The screenshots below show two entities with different Z values:

Z-axis direction is set to vector2(0,-1) by default, which means that entities with positive z-position move upwards, as images above illustrate, but z-direction can be edited in the Scene Editor's "Advanced properties".

  • Select Show advanced options in the Scene Editor in order to customize the Z-axis direction of the scene.

Side-scrollers like Super Mario or most space shooters would rather have vector2(0,0) as z-direction.