SetViewOffset

Description

Offset the screen viewport relative to the world, for example a view offset of 0,20 will move the screen down by 20 pixels showing any sprite that was previously positioned just off the bottom of the screen. This can be useful for scrolling games where you want to move the view across a level.

Using this command will automatically disable the four physics walls surrounding the screen.

You can also fix sprites to the screen so that they move along with it by using FixSpriteToScreen.

The view offset values position the top left corner of the view in the world, while SetViewZoom determines how much of the world the view can see.

Definition

SetViewOffset( x, y )

Parameters