User Tools

Site Tools


ixe:irpl:game:setcamerazoom

This is an old revision of the document!


SetCameraZoom

SetCameraZoom(<-zoom)

Description

Sets the camera zoom. The zoom is equal to half the vertical size of the viewport in world (sand) pixels.

Examples

SetCameraZoom(256)
# This sets the viewport's height to 512, exactly enough to see the entire map if centered
 
GetScreenSize ->screenSize
SetCameraZoom(<-screenSize.y 8 div)
# This sets the camera to a fixed resolution of 4 screen pixels per world pixel regardless of screen size
ixe/irpl/game/setcamerazoom.1737498383.txt.gz · Last modified: 2025/02/14 14:56 (external edit)