Parallax background not working

So I've been trying to implement camera parallax scrolling in my game since yesterday using methods shown in other threads.
However I have been unable to do so, the background either stays where it is when I move my actor, or moves with the scene depending on the settings.

These are the methods I have tried, I'm not sure what it is I'm doing wrong:

The first, posted by SquareHeart:

Make Background actor whatever size - add image - make image tilable on the Horzontal
make it non movable and make sure it is a non-scrollable layer in your scene.

create two new [real] attributes to the actor - start.X and start.Y
Create two [change attribute]s in the background actor

--- change attribute self.start.X to self.position.X
--- change attribute self.start.Y to self.position.Y

(this sets the start position of the actor into the startX/Y attribute)
Make sure you have the camera controlled by something in your scene

now add the background actor to your scene and double click it to unlock it
now add 2 more rules to the actor
---> constrain attribute self.position.X to -scene.camera /6 + self.start.X
---> constrain attribute self.position.X to -scene.camera /6 + self.start.X

SquareHeart: http://forums.gamesalad.com/discussion/17974/a-question-about-scrolling-platformers-with-parallax

And the other posted by HoneyTribeStudios here:
http://forums.gamesalad.com/discussion/13479/parallax-scrolling-i-think-i-love-you-possibly-more-than-interpolate

I found many others but they were controlled by the actors movements, I am looking for it to be controlled by the camera.

I've read about Mynameisace's parallax scrolling template, however the link he posted of it here is dead, if anyone can provide it please do.

Thanks

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692

    We have some free templates with this over at DBA.

    Santa go is the most recent one.

    Hope this helps,

    Darren.

  • ApacheGApacheG Member Posts: 8

    @DeepBlueApps said:
    We have some free templates with this over at DBA.

    Santa go is the most recent one.

    Hope this helps,

    Darren.

    Thanks! It's not camera controlled, nonetheless, still wanted to know that method as well.

    However if anyone wants to clarify why SquareHearts method above isn't working for me, please do. I may still want to use that in the future.

Sign In or Register to comment.