Camera Control Question

DrGlickertDrGlickert Member Posts: 1,135
edited November -1 in Working with GS (Mac)
I'm making a simple 2D side-scroller. I'd like the player to control the camera and I'd like for the player to be about 1/3rd of the way on the screen (not in the middle). How do I set up the camera to be slightly off center?

This is a simple answer isn't it?

Comments

  • RHRH Member Posts: 1,079
    search for orbzample and take a look at his camera movement demo.

    You could also unlock the instance and constrain scene.camera.origin.X to characterX location - 160. This removes the jerky looking movement.
  • expired_012expired_012 Member Posts: 1,802
    Im not entirely sure if this is what you need but from the way you describe it im guessing it is

    You can create a game real attribute CharacterPosX,

    and then in your main character actor put in:
    constrain attribute: game.CharacterPosX to self.position.X.

    then make a blank actor and place it on the screen. Inside that actor put in:
    -constrain attribute: self.positionX to game.CharacterPosX+400(adjust to whatever you like)
    -control camera
Sign In or Register to comment.