|
I'm making an auto 2D-sidescroller like Bit Trip Runner or Canabalt, and I'm using the smooth follow script. The thing is that the smooth effect/damping make it looks like my character is placed to right. Becuase he's always running the smooth effect is unnecessary. So my question is: How can I remove the smooth follow effect and just make the camera follow the character? Here's the script:
(comments are locked)
|
|
If you want the camera locked to the player's position on the x axis and y axis (assuming your 2 dimensions are x and y) then you'de use a much simpler script. That puts the player always right in the center of the screen with the camera backed up to Let's say you wanted the camera to be centered just above the player, or just in front of the player. Now in the inspector you can change the Thanks for your fast reply. But I just want the camera to follow the player on the x axis. When I applied your first script something went wrong with the camera distance and I can't even see the character when I hit "Play". The distance are not effected when I move the camera. Any clue how to solve this?
Aug 23 '11 at 09:02 PM
spanjoar
Just to confirm you do have your scene laid out using A variation that would lock the
Aug 23 '11 at 09:11 PM
Rennat
That's exatcly what I was looking for, thank you so much! And yes: y = Vertical and x = horizontal. I didn't notice the distance controler at first, that explain why the camera was zoomed in :)
Aug 23 '11 at 09:31 PM
spanjoar
Awesome glad it helped, please "thumbs up" it and check it off as a correct answer :)
Aug 23 '11 at 09:35 PM
Rennat
(comments are locked)
|
