Hello Guest

Author Topic: Parallax scrolling  (Read 7884 times)

cloudcamaleoniv

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 27
    • View Profile
Parallax scrolling
« on: May 21, 2013, 10:18:06 pm »
I've found some results on the search page, but none of them explains how to do this effect on 2d toolkit.

I've done the following. Created 2 tk2dsprite with the same sprite in it. I moved the second to the right side of the first and I keep moving the two of them at a constant speed to the left. When the first move off the left bounds, I move it to the right side of the second sprite. When the second one moves away from the left bounds, it moves to the right of the first sprite. And there you go. Theoretically, it works, but I keep getting a thin, perceptible, ugly line between the two sprites.

Is there a more "right" way to do it? Or another way that has proven to work? Thanks.

« Last Edit: May 21, 2013, 10:31:55 pm by cloudcamaleoniv »

xellinus

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Parallax scrolling
« Reply #1 on: May 21, 2013, 10:51:05 pm »
I do my parallax scrolling with 2 cameras. One is my ortho and one is perspective.
I picked up the technique from sizefive games.
http://www.sizefivegames.com/2012/11/07/using-unity3d-for-the-swindles-2d/

SullyTheStrange

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 55
    • View Profile
Re: Parallax scrolling
« Reply #2 on: May 22, 2013, 08:33:06 am »
I do my parallax scrolling with 2 cameras. One is my ortho and one is perspective.
I picked up the technique from sizefive games.
http://www.sizefivegames.com/2012/11/07/using-unity3d-for-the-swindles-2d/
Thanks for the link, very helpful stuff. :)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Parallax scrolling
« Reply #3 on: May 22, 2013, 12:19:20 pm »

cloudcamaleoniv

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Parallax scrolling
« Reply #4 on: May 24, 2013, 08:21:56 pm »
Oh yeah. I've tried your slolutin unikron. Now it works. So simple huh? Thanks man.