Skip to content

Z.ScreenTransform

Z.ScreenTransform is a node with a coordinate system mapped to the screen of the device. Nodes relative to a Z.ScreenTransform node will appear flat on the screen.

Holding the device in landscape, screen space has the following coordinate system:

  • it is centered at the middle of the screen;
  • its X coordinate is positive to the right;
  • its Y coordinate is positive towards the top of the screen;
  • its Z coordinate is positive out of the screen towards the user;

Screen space is scaled such that a Y value of +1 is always at the top of the screen and a Y value of -1 is at the bottom of the screen.

Screen space is orthographic. This means that objects appear the same size regardless of how far they are from the camera (i.e. regardless of their Z coordinate).

A global instance of this object is available as Z.screen.

For more information see Coordinate Systems.