User Tools

Site Tools


ixe:irpl:game:setcamerazoom

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.txt · Last modified: 2025/01/21 17:26 by Argonwolf