Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: HeathClose on February 22, 2017, 07:12:55 PM

Title: Scrolling Background
Post by: HeathClose on February 22, 2017, 07:12:55 PM
I need to make my backgrounds scroll in parallax, how do I achieve this... tried to look at some threads but they look very outdated... I have procamera 2d, and that has a parallax option... but I'm not sure how I get my background to repeat...
Title: Re: Scrolling Background
Post by: Ofonna on February 23, 2017, 01:25:52 AM
this might not be the most ideal but if you're talking about a 2d game then here is what i do.

for 3d i simply offset the texture everyframe

but on 2d backgrounds like flappy bird. i duplicate the background so its wide enough, make both of them a child of an empty game object and then ease float from  a certain point on the first background to the same point on the second and then have another state that returns back to the easefloat state to make the action repeat instantaniously. this works perfectly for me.
Title: Re: Scrolling Background
Post by: jeanfabre on February 23, 2017, 03:58:30 AM
Hi,

 These two options are great, no problem with it.

 for the texture offset, make sure you loop and not add to it indefinitly, I am not sure it likes big values in the offset.

If your texture is set to repeat, offseting the uv value ranging from 0 to 1 is the most direct.

 Bye,

 Jean
Title: Re: Scrolling Background
Post by: Fat Pug Studio on February 23, 2017, 05:42:05 AM
Check it out: http://pixelnest.io/tutorials/2d-game-unity/parallax-scrolling/

Scroll down to Infinite background scrolling, it works great, just put a few backgrounds and make the ones further away move slower than the ones in front.

However, i want to make a modification and i want to make it in Playmaker only, any ideas?
Title: Re: Scrolling Background
Post by: jeanfabre on February 24, 2017, 03:14:33 AM
Hi,

 nice, Please bump me on this every other week or so, I think it's a good thing to port to PlayMaker.

Bye,

 Jean
Title: Re: Scrolling Background
Post by: HeathClose on February 24, 2017, 04:56:21 PM
for now I'm using this free asset... no coding...

http://u3d.as/bvv (http://u3d.as/bvv)
Title: Re: Scrolling Background
Post by: zeeawk on March 13, 2018, 02:00:19 AM
Has it been a week yet ? :)

Hi,

 These two options are great, no problem with it.

 for the texture offset, make sure you loop and not add to it indefinitly, I am not sure it likes big values in the offset.

If your texture is set to repeat, offseting the uv value ranging from 0 to 1 is the most direct.

 Bye,

 Jean
Title: Re: Scrolling Background
Post by: jeanfabre on March 14, 2018, 03:01:19 AM
:) ouch...

Have you tried HeathClose suggestion?

 Else, let's give it another week and I'll have a go at it...  :o

 Bye,

 Jean