playMaker

Author Topic: help with camera constraint[SOLVED]  (Read 4600 times)

schilley

  • Playmaker Newbie
  • *
  • Posts: 4
help with camera constraint[SOLVED]
« on: March 30, 2013, 03:16:51 PM »
Hello everyone. I am new here.I have been using playmaker and unity for almost 3 months and it's been like a rollercoaster. I am more on the creative side.  Jumping from the 2d and 3d art world to programming can get bumpy. But the experience is so satisfiying. Anyway, I am working on this little 2D platformer game. So far everything is working ok, but  camera. I used the "Smooth follow action" on the game camera to follow the player. The problem is when the player jumps,the cam follows him in the y axis too. How do I lock or constraint the y axis of the camera so it only follows the player in the x axis?

Note: being a 3d artist, I am surprised that Unity doesn't let you just lock your camera transform( position and rotation) in the interface. This is such a common feature in 3d packages.
« Last Edit: April 02, 2013, 02:36:50 AM by jeanfabre »

schilley

  • Playmaker Newbie
  • *
  • Posts: 4
Re: help with camera constraint
« Reply #1 on: March 31, 2013, 08:29:38 PM »
 can anyone please help me with this?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4003
  • Official Playmaker Support
    • LinkedIn
Re: help with camera constraint
« Reply #2 on: March 31, 2013, 08:44:51 PM »
You could use a Set Position action to set any axis to a constant value:
https://hutonggames.fogbugz.com/default.asp?W102

schilley

  • Playmaker Newbie
  • *
  • Posts: 4
Re: help with camera constraint
« Reply #3 on: April 01, 2013, 02:15:56 AM »
thanks man. I am going to try it

schilley

  • Playmaker Newbie
  • *
  • Posts: 4
Re: help with camera constraint
« Reply #4 on: April 01, 2013, 09:09:54 PM »
it worked. I did a combination of "set position" and "get property". No need for me to use the "smooth follow action" Anymore. Thanks