0

Player falls down and die, unity c# script

All i want is my player to die when it goes below the camera range. . . i am working on a 2d game quite similar to color switch or amazing brick... that is just to give you an idea... it is basically a tap tap kind of game where player taps and the object jumps verticaly right or left i am looking for a c# scripts where the player dies when he gets below camera. what to notice here is this that it is a vertical game so camera is continuously moving in upward direction along Y axis. can anybody here help me with a code?

18th Oct 2018, 3:17 PM
Zen
Zen - avatar
3 Réponses
+ 1
Anna, i have recently started working on this platform and i really really apreciate that you replied to my query. Thank you so much for your help.
18th Oct 2018, 3:49 PM
Zen
Zen - avatar
0
if(player.position.y <= camera.range.y) { kill_player() } is probably too easy?
18th Oct 2018, 3:28 PM
Anna
Anna - avatar
0
You're welcome 🙂
18th Oct 2018, 5:45 PM
Anna
Anna - avatar