Platformer Camera ideas.

GraybayGraybay Member Posts: 114
edited November -1 in Working with GS (Mac)
I am developing a side scroller and I have scoured these forums and tutorial videos for an answer to my issue but to no avail. I have been racking my brain over this for a few days now.

I wish to create a camera that will lead ahead of the character wether he is going left or right to give the player a better view of what's coming ahead. I have already come up with a solution on my own but there are a few minor issues with it.

I have two invisible walls which are constrained to my player actor, one to the left and one to the right. I have created another actor which the camera is controlled by that stays in the middle of those two walls along with the player actor. it accelerates a little faster than the player and it collides with the walls so that it cannot get beyond that distance from the player.

It works quite well for the most part, but it causes some random jerkiness in the game, I think when the camera tracker collides with the walls, the physics are acting up, its trying to go through the wall and therefor causing a shaky camera. Is there a setting that can disable the physics and just have a clean collision or something?

I also thought of placing my invisible walls on a none scrollable layer so that they would always be in the same place and not need to be constrained to the player. But it seems as though their coordinates do not change when in a none scrollable layer, so the camera just hits them and gets left behind while the player continues on ahead.

I wish there were a method that didn't require the invisible walls, something that can be done just with "coding," If anyone has any ideas or links to demos or examples I would really appreciate it.

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Open GameSalad Click New and search for Camera Tracking Thirds ORBZAMPLE
  • GraybayGraybay Member Posts: 114
    Thanks tenrdrmer, I have tried the orbzample, It didn't help because if the actor suddenly changes direction before reaching the far end of the screen it snaps the view very harshly to the new side, however this would be perfect if there was a way to ease the transition from left to right and not be so snappy. Any idea how?
Sign In or Register to comment.