Need help with camera and Parallax scrolling

perfectanswerperfectanswer PRO Posts: 121
edited November -1 in Working with GS (Mac)
Hello guys,

I try to figure out how I can tie the parallax scrolling to the camera movement.

I have several layers:
1. foreground layer (here plays the music)
2. background layer with cityscape
3. background layer with distance city

There a 2 way to control the camera now.
1. touch control of the foreground layer, you can move by touch the layer to the left or right
2. camera control by actor. if the actor fly thru the scene, than he control the camera

so far , so good ;)

What I want:
If I move the foreground layer to the left, or right, I want the 1. background layer move to the counter direction (slow) and the 2. background layer in the same direction like the camera, but slower than the first background.

The look & feel of this you can find in games like angry birds as example.

I have no WrapX in the scene and the parallax effect should only visible when camera moved.

Any suggestions??

Hope sb can help me out here ;)

Comments

Sign In or Register to comment.