Rellax while the Camera tracks with cool parallax
This module uses the Camera and Viewport API from Adventure Game Studio 3.5.0.
Before starting, you must create the following Custom Properties
in AGS Editor, for usage with Objects.
Just click on Properties [...]
and on the Edit Custom Properties
screen,
click on Edit Schema ...
button, and add the two properties below:
-
PxPos:
Name
:PxPos
Description
:Object's horizontal parallax
Type
:Number
Default Value
:0
-
PyPos:
Name
:PyPos
Description
:Object's vertical parallax
Type
:Number
Default Value
:0
The number defined on Px
or Py
will be divided by 100 and used to increase
the scrolling. An object with Px
and Py
0 is scrolled normally, an object
with Px
and Py
100 will be fixed on the screen despite camera movement.
The character being tracked by the Game.Camera.
Gets/sets whether Parallax is on or off.
Gets/sets whether Smooth Camera tracking is on or off.
Gets/sets the camera horizontal offset.
Gets/sets the camera vertical offset.
Gets/sets the camera horizontal lookahead offset.
This is an additional offset that is added in the direction the target character is facing (only 4 direction support now).
Gets/sets the camera vertical lookahead offset.
This is an additional offset that is added in the direction the target character is facing (only 4 direction support now).
This module is created by Érico Porto and is provided with MIT License, see LICENSE for more details.
The code on this module is based on the code of Smooth Scrolling + Parallax Module from Alasdair Beckett, which bases his code on code from Steve McCrea.
The demo game uses CC0 (Public Domain) art provided by jetrel.