There are plenty of variants for doing this, but this is probably the easiest:
The +100 is the horizon line (the point your character vanishes from view for being too far away), change that and the <100 in the if/else to adjust your horizon line. You don't need this if you want the horizon line to be exactly the center.
The /2 is the rate is grows/shrinks when moving up or down. Make it higher to have a lower rate of change (the sprite usually will be smaller), make it lower (decimals like .5 work) to have a higher rate of change (usually the sprite will be larger). You don't need this if you want it to be 1.
Last edited by Kileymeister (2011-01-18 18:35:45)
Offline