Game Development Reference
In-Depth Information
• An array of background images, which is layered correctly in the scene (which is
why the script does not just discover the background sprites)
• A scaling factor to control how much the background moves in relation to the
camera target, for example, the camera
• A reducing factor to offset how much each layer moves so that they all don't
move as one (or else what is the point, might as well be a single image)
• A smoothing factor so that each background moves smoothly with the target and
doesn't jump around
Implementing this same model in your game would be fairly simple provided you have
texture assets that could support it. Just replicate the structure used in the platformer 2D
sample and add the script. Remember to update the FollowCamera script to be able to
update the base background, however, to ensure that it can still discover the size of the
main area.
Search WWH ::




Custom Search