User Tools

Site Tools


ixe:irpl:game:setcamerazoom

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ixe:irpl:game:setcamerazoom [2025/01/16 18:36] – Tag cnversion Karsten75ixe:irpl:game:setcamerazoom [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 5: Line 5:
  
 ===== Description ===== ===== Description =====
-Sets the camera zoom. The zoom is the orthographic size for the camera. +Sets the camera zoom. The zoom is equal to half the vertical size of the viewport in world (sand) pixels.
 ===== Examples ===== ===== Examples =====
 <code 4rpl> <code 4rpl>
 +
 +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
 +
 </code> </code>
ixe/irpl/game/setcamerazoom.1737052575.txt.gz · Last modified: 2025/02/14 14:56 (external edit)