Camera.getY()

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

Overview

This function retrieves the current Y position of the camera. This position is along the vertical Y-axis which increases in value from top to bottom.

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

…this function would return 3

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

Syntax

Camera.getY()

Examples

-- tileEngineViewControl is an instance of ViewControl
local camera = tileEngineViewControl.getCamera()
local curY = camera.getY()