The Daily Click ::. Forums ::. Klik Coding Help ::. Some more questions about parallax
 

Post Reply  Post Oekaki 
 

Posted By Message

Benny Lindberg



Registered
  08/11/2010
Points
  54
21st November, 2011 at 17:55:57 -

Hi there! In the game I'm making, there will be different height levels. I need parallax-scrolling bushes on both levels. I got it fixed on one level, but I'm thinking that if I put it on the upper level, the bushes will scroll with me while i'm on the lower level and i will see bushes coming into my field of view, without me being on that level.
I think, in theory, I need some way of telling it to only parallax if I'm past a certain point in x-level, and for the bushes to never go past the "cliff" part of the upper level. Any ideas on how I'd do this?

 
n/a

Benny Lindberg



Registered
  08/11/2010
Points
  54
21st November, 2011 at 18:09:29 -

Ah, I solved it. Posting solution here for anyone interested:


You have layers that are set to parallax. And then you have some background layers that don't.
If the player is greater than X in x-axis, move the object to parallax layer. If less than X in x-axis, move back
to static layer. This requires more active objects though, but it's the only solution I could think of.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click