Parallax Front or BackGround

hzappshzapps Member, PRO Posts: 173
Aloha All,

In working with Cannon Template I am trying to obviously keep the cannon steady, but when I fire the cannon I am looking to make the cannonball sail across the screen and then have at least one if not two backgrounds slowly PARALLAX across the screen slowly and keep the grass etc steady.

My question is how to I get the back two backgrounds move as the Cannonball flies across the screen,
and then Reset back for another shot.

I watched most of the tutorials surrounding Parallax, but they seem to have the character stay steady and the backgrounds all move. I really want to try and keep them moving only when the cannonball is moving from left to right

I appreciate any of your help.
Thanks
Mike

Comments

  • kinzuakinzua Member Posts: 554
    If your actor is not stationary .. and your cam follows your actor.. the background will automatically seem to be moving.. provided.. your background fills your scene.
    Next, you can have a far-background-layer (call it 'fbl' ), check fbl layer -> 'scrollable' to unchecked in the Scene-> Layers section. This layer, will now not move along with cam and will seem moving at a very distant slow pace.
    Hope i answered what you were looking for.
  • ashtmjashtmj Member, PRO Posts: 405
    Unlock your background actors then add this rule:

    Constrain self.position X to (whatever the images X position is on scene, for this we'll say 500) 500-(game.camera origin/12)

    the more you divide the camera origin the slower it will PARALLAX

    500-(game.camera origin/25) would be slow
    500-(game.camera origin/4) would be real fast

    hope that helps
    -Ash
Sign In or Register to comment.