playMaker

Author Topic: 2D camera parallax  (Read 1732 times)

QueenM56

  • Junior Playmaker
  • **
  • Posts: 55
2D camera parallax
« on: June 13, 2018, 04:45:02 AM »
Hi all,

I'm trying to create the camera parallax effect for my 2D game.
I was hoping to know what is the best way to do it...
I'm currently using the perspective camera and put the flat images in different Z distance.
It works functionally, but when the camera moves up and down it reveals some bad views of 2D images.
I was wondering if there is a better way to do it besides the perspective camera.

Cheers,
M

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: 2D camera parallax
« Reply #1 on: June 13, 2018, 12:14:13 PM »
2D with perspective camera? But why? Swotch to orthographic, and problem solved.
Available for Playmaker work

QueenM56

  • Junior Playmaker
  • **
  • Posts: 55
Re: 2D camera parallax
« Reply #2 on: June 13, 2018, 09:43:53 PM »
Because I want to create parallax camera effect
The off set layer will have no effect with orthographic camera.
what's the best way to create parallax effect with orthographic camera?

Cheers,
M

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: 2D camera parallax
« Reply #3 on: June 14, 2018, 11:35:57 AM »
Just give the layers a different z transform values or use sorting layers to put them one behing another and move them at different speeds.
Available for Playmaker work

QueenM56

  • Junior Playmaker
  • **
  • Posts: 55
Re: 2D camera parallax
« Reply #4 on: June 14, 2018, 10:27:04 PM »
Hi Krmko,
I'm currently using the first method.
different Z transform + perspective camera.
It works fine on my lap top but the UI button didn't work.
Did you happen to know how to solve the problem?

Thanks
M