Game Development Community

Per-layer camera position factors

by Jemand den es nicht gibt · in Torque Game Builder · 07/19/2006 (5:36 am) · 2 replies

Hey,

right now it's not easily possible to get a parallax scrolling background if you have a camera that moves around your scene. It only works if the camera is still and shows some differently panning scrollers/tile layers.

It would be nifty to have per-layer camera position factors. For example, if you have two layers in your game.. the one at the front where all the stuff happens and in the background you have another one with say, buildings that are far away. You set that layer to move only 0.5 of the actual camera movement, for example.

#1
07/19/2006 (6:08 am)
You can easily adjust scrollers while your game is running based on camera movement. Check out the scrollerDemo. Specifically how the speedMod dynamic field is set in the level builder and how background.cs adjusts the speed that they scroll.
#2
07/19/2006 (6:10 am)
Ugh, how embarrassing, I totally missed that one out, sorry! :)