Stop the actor to go out of the camera view?

nypraisenypraise Member, PRO Posts: 96
edited August 2012 in Working with GS (Mac)
I have a actor that can be moved when pressed/touched, but when the user moves it around it can also be moved outside the camera view. Is it a way to make it collide with the "wall" of the camera? So the actor don´t go out of the screen? :)

Comments

  • Pennez-GamesPennez-Games Member Posts: 107
    edited August 2012
    Well first off I'm not sure exactly what your trying to say but I'll have a shot. So first off obviously put the behaviour "controll camera" in the main actor
    Now create a wall actor and make the wall actors restitution to 0
    And uncheck moveable. Make a collision behaviour in the main actor.
    Collide with walls. And put those walls on both sides of the screen. And that will keep your player on the screen :D

    Oh and also of you don't want the walls to be seen uncheck visible.
  • nypraisenypraise Member, PRO Posts: 96
    Well, it´s a actor that you can move with your finger when pressing it. And it won´t be stopped be the collide behavior. I have done just as you said, but not restitution to 0. How do I do that? :P
Sign In or Register to comment.