- Home /
How to move camera only when player is past halfway
I am making a game somewhat similar to doodle jump where I want the player to be able to stay below the center of the camera without it moving, but if the player goes above that point the camera moves up with him and the rests when he starts falling again. Does anybody know how to do this? I have no idea where to start...
Comment
Best Answer
Answer by Kiwasi · Oct 17, 2014 at 12:17 AM
Pseudo code
if(player.transform.position.y > mainCamera.transform.position.y){
// Move camera up
}
Your answer
Follow this Question
Related Questions
How to show live camera on android inside scene??? 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Loading pictures, how to hide and load in-game pictures? (details) 0 Answers
the unity aspect ratio script looks good in computer but not in android phones 0 Answers
how to switch camera 2 Answers