Camera actor limits, how to set?

GLGAMESGLGAMES SingaporeMember Posts: 988
edited February 2012 in Working with GS (Mac)
Hi guys,
I'm trying to set a limit so that the actor which has a camera control will not end up showing whats beyond the boundary of the scene itself. As i have a double wide scene and keeping some off screen items there, i do not wish to see it during gameplay.
However when the camera actor gets too close to the sides i will be able to see the items beyond the game area it self.
How can i limit this camera area?

Comments

  • simo103simo103 Member, PRO Posts: 1,331
    in the actor controlling the camera have a rule that stops the actors movement prior to hitting the end of the scene ... ie: like if self.positionX is greater than 2000 stop movement
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    edited February 2012
    Ok i think i got the answer, i nd to tweak the camera tracking area to just show what is necessasry....
    lots of trial and error to determine the correct area..

    :P well discover something new everyday .
  • simo103simo103 Member, PRO Posts: 1,331
    in the GS creator in your scene you will see a blue arrow pointer and what looks like a video camera (near top left). If you click the camera it shows you the tracking area of the the camera and you can drag in the sides to have it tightly follow your actor. And also make sure the invisible wall is far enough in your scene that the camera stops before the end.
  • MotherHooseMotherHoose Member Posts: 2,456
    Note that the white outlined rectangles that are in the SceneEditor are showing you the cameraAttributes:
    outer rectangle: Size everything in this area will show
    inner rectangle: trackingArea the camera movement will occur in step with this are

    for sideScrolling games it might be better to have the sceneHeight double and use that for off-screen items

    @};- MH
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    Yuh i'm doing an upward scroller so i thought i'll have it double wide.
    I'll try and play around with the area tracking to see if it works nicely.
Sign In or Register to comment.