playMaker

Author Topic: Scrolling Background  (Read 3882 times)

HeathClose

  • Full Member
  • ***
  • Posts: 226
Scrolling Background
« 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...

Ofonna

  • Full Member
  • ***
  • Posts: 230
Re: Scrolling Background
« Reply #1 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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Scrolling Background
« Reply #2 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

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Scrolling Background
« Reply #3 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?
« Last Edit: February 24, 2017, 02:17:15 AM by krmko »
Available for Playmaker work

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Scrolling Background
« Reply #4 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

HeathClose

  • Full Member
  • ***
  • Posts: 226
Re: Scrolling Background
« Reply #5 on: February 24, 2017, 04:56:21 PM »
for now I'm using this free asset... no coding...

http://u3d.as/bvv

zeeawk

  • Playmaker Newbie
  • *
  • Posts: 12
Re: Scrolling Background
« Reply #6 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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Scrolling Background
« Reply #7 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