Im trying to create a running game. Im not sure how to keep the character to the a third of the screen while the camera pans to the right across the scene.
Ahead of your player, I would place an actor at the distance you would like the camera to be, it doesn't have to be exact because we are about to make a constraint that will put it in position anyways. Make a game attribute representing your player's X coordinate, call it player_X. In your player actor, use a constrain attribute to constrain the attribute you just made (player_X) to your players self.position.x. Now go into the actor you just created for the camera to follow, this time constrain this actor's self.position.x, open the expression editor for the "To" attribute. add game.player_X then right after that place a +100, then click the check mark. next, place a "control camera" attribute on this actor, make sure you don't already have one on your player actor. If you hit preview, the camera should now be ahead of your character when he moves, you can adjust the (+100) to more or less to change the distance from player to suit your needs. As an added note, don't forget to adjust your camera in camera mode, it looks like a little video camera and is located above your scene editor window, below the preview button. Hopefully I didn't forget anything.
Comments
Good luck!
Darren.