playMaker

Author Topic: Very basic 2D camera question  (Read 1233 times)

TastyCarcass

  • Playmaker Newbie
  • *
  • Posts: 1
Very basic 2D camera question
« on: March 24, 2014, 02:52:34 PM »
Hi everyone

 I'm using playmaker and I'm attempting to create a camera system for a 2D platformer game.

 Currently, the camera is a parent object of a camera parent object, which gets the position of the

 There are points in this game where I would like to stop the camera from moving past if it reaches a certain point.

 I had the idea of giving the camera a box collider. I can create a cube with a box collider in it to represent an area that I do not want my camera to cross.

 Currently my state machine uses two events, simply get position of the player camera and set the position of the camera parent to the player camera position. I believe that there needs to be a collision check between these two events. 

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Very basic 2D camera question
« Reply #1 on: March 24, 2014, 04:37:25 PM »
You have the right idea on using a trigger to stop the camera so what I would suggest is to check out these samples for playmaker.

http://www.hutonggames.com/samples.php

there is one where you bounce up and down, that has the same method you are looking for with all the bells and whistles. It helped me a lot when it came to doing what you described.

**The tutorial is in the m2h sample set towards the bottom of the page
« Last Edit: March 24, 2014, 04:45:35 PM by sebaslive »
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez