Download Adventure Creator manual

Transcript
Adventure Creator User Manual
Page 102
8.3 - PARALLAX 2D
In games made in Unity 2D mode (as set by the Moving and turning popup in the
Settings Manager), the camera does not physically move. When it pans sideways, the
perspective remains fixed.
As this happens, all objects in the scene will move across the game window at the same
rate, regardless of their distance from the camera. Therefore, the Parallax 2D script
can be used to achieve a depth affect by causing them to move with the camera – the
speed at which it follows will determine how far away it feels.
Attach the Parallax 2D script to a background sprite, and assign a Depth value. The
more positive the value, the further away it will seem. The more negative, the closer it
will seem. This script is used on the foreground and background objects in the 2D
demo's Park scene.
For more advanced effects, it is also possible to limit the parallax movement to within
pre-set boundaries in both the X and Y directions. Just check Constrain? within each
directional box to set upper and lower bounds.
© Copyright Chris Burton, www.iceboxstudios.co.uk