playMaker

Author Topic: [SOLVED] Best method for a 2D parallax  (Read 3199 times)

Drunkenoodle

  • Playmaker Newbie
  • *
  • Posts: 25
[SOLVED] Best method for a 2D parallax
« on: July 16, 2012, 04:41:27 AM »
Hello there,
Last night I knocked together a quick experiment using flat planes, a couple of cameras and some 2D materials to give the effect of a parallax in the background.

The method I used in playmaker resulted in the planes moving using set position, in relation to the main camera that follows the player, and in turn dividing it by a certain negative value (so that it moves in the right direction).

What got me thinking though, is that this method can be pretty inaccurate in terms of movement, and could potentially be quite costly for resources. My question to you is, would you follow a similar method, or is there something that could work a little better?

Many thanks everyone!
« Last Edit: July 16, 2012, 01:26:45 PM by Alex Chouls »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Best method for a 2D parallax
« Reply #1 on: July 16, 2012, 05:19:55 AM »
Hi,

 you are certainly on the right path, you will need to move gameObjects in all cases to create a parralax effect.

have you checked:

http://www.wyrmtale.com/orthello-pro/parallax

Bye,

 Jean

Drunkenoodle

  • Playmaker Newbie
  • *
  • Posts: 25
Re: Best method for a 2D parallax
« Reply #2 on: July 16, 2012, 06:00:26 AM »
Hi Jean,
 Once again you've pulled me out of a tough spot. Thanks very much for that link, it's exactly what I'm looking for! If I could, I would pass you a very epic sandwich as thanks.

All the best! :]