I want to make my camera follow the player ONLY when the player is on solid ground [2D]
TL;DR (Too Long; Didn't Read for those who don't know) will be the bolded text
So far I have my camera following the player at all times. However with how high the player jumps and how quickly they fall, it moves the playing field out of view and can look generally bad. My solution is that I want to make the camera follow the player only when they are standing on an object that has the "ground" tag. To make my question/problem more concise: I want the camera to follow the X-axis at all times but if the player jumps, the camera doesn't move up or down until the player should land on ground again. Think about the impossible game, when the player jumps, the camera doesn't move until the player lands on ground or another black square. Here's a link if you don't know the game. But back to my question: Would i achieve this by fixing the camera to the player and only raising the camera when the player is grounded, would I set the camera to only go up or down when the player hits a certain height on the screen, or is there another solution that I'm not seeing? Thank you in advanced for any help you may provide!
Your answer
Follow this Question
Related Questions
2D platformer: how to stop camera at the end of the map? 0 Answers
I want to make my camera follow the player ONLY when the player is on solid ground [2D] 1 Answer
Is there a way to smoothly change a float number between two numbers when a key is pressed? 1 Answer
Changing gravity depending on character/camera rotation 0 Answers
Rigidbody2D.velocity Interupts Rigidbody2D.AddForce in 2D Platformer 0 Answers