Camera Control not working !

tayshun12tayshun12 Member Posts: 1
edited January 2012 in Working with GS (Mac)
Hi All,

I am trying to create a game where the camera needs to follow a single character but it is not working. I made sure that the layer is scrollable and added the camera control to my character, but when I start the game, the character will move off screen. I am trying to start the character off at a different point on screen similar to the 'Platformer Template'. Any help would be greatly appreciated! thank you!

Tayshun

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Does the camera follow the character at all? Or does it follow it for a little bit and then the character goes off screen? Not sure if this is the issue, but there is nothing stopping your character from going outside of the scene. However the camera will never go outside of the scene. To stop your character you will need to create a "Wall" actor. Make it non-movable and set its restitution to 0. Then put a collide behavior in it so it collides with the main character.
  • tayshun12tayshun12 Member Posts: 1
    It does not follow my character at all. I change to camera mode when editing and make the box to fit my character but it shows the full view of the screen with my character off center.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    When you change the inner box all you are doing is changing the tracking area. Try this: Go into the scene. Click on the small scene button (right next to game) to see the scene settings. Click on the triangle next to scene and change 480 to 960 and change 320 to 640. You will now see that your scene just doubled in size. Put a background image in to the scene as an actor and drag it to fill the scene (if you leave it black you will not be able to tell if anything is moving). Now click the green preview button and you should be able to move around the scene the with the camera following. If the scene size is the same as the camera size it is impossible for the camera to go anywhere as the camera cannot go beyond the edges of the scene.

    hope this helps.
  • sometimes the camera control rule just goes weird for no reason. in a game i'm making the camera control would work totally fine, but then stop working if the game was paused then unpaused. the solution i'm using for now is to do things like add camera control rules to a bunch of random behaviours, eg. to moving left, right, jumping, colliding with floor ect.
    this means that no matter what you are doing you're always in control of the camera. Most of the time it looks very smooth, but this isn't always a great solution cause in some situations the camera will look really clunky and jarring...

    as far as i know it seems like you're problem is the same as mine (just the program screwing up), but I could be wrong. Anyway I hope this helps! Maybe also try copying your actor, the deleting the old one. Or copying all of the rules into a new actor ect. sometimes things like this tend to sidestep random glitches.
    also if anyone here has also had problems with camera control after pausing, don't suppose you found a better fix then the one i just suggested?
  • parle1parle1 Member Posts: 1
    Hi all,
    I can move fine and the camera is tracking, but when I move a bit the camera stops and i cant move in that direction anymore.
    i tried going into camera mode and it looked like I stopped where the original camera boundary was.
    Plz help
  • CloudsClouds Member Posts: 1,599
    Hi all,
    I can move fine and the camera is tracking, but when I move a bit the camera stops and i cant move in that direction anymore.
    i tried going into camera mode and it looked like I stopped where the original camera boundary was.
    Plz help

    How big is your project ?
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
Sign In or Register to comment.