Camera.getX()

   
Type function
Library wattageTileEngine.Camera.*
Return value Number
Keywords Wattage, Camera
See also  

Overview

This function retrieves the current X position of the camera. This position is along the horizontal X-axis which increases in value from left to right.

The unit of the returned value is tiles. For example, given the following…

…this function would return 2.5

NOTE: It would not return the pixel value of 80!

Syntax

Camera.getX()

Examples

-- tileEngineViewControl is an instance of ViewControl
local camera = tileEngineViewControl.getCamera()
local curX = camera.getX()