- Home /
Respawn after going past Y Height
I am making a 2D Platformer game in order to familiarize myself with Javascript and Unity(I am fairly new at this). I would like my player to respawn after going past a certain y value. How would I do this?
Comment
Answer by Esa · Mar 19, 2012 at 06:09 AM
With the given information it should be as simple as this:
if(transform.position.y > yourMaxValue)
RespawnPlayer();
Your answer
![](https://koobas.hobune.stream/wayback/20220613065256im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Fade on death! 1 Answer
Make Deaths end game 1 Answer
Help with player death/respawn coroutine? 1 Answer
How do I make my character die when hitting the terrain? 2 Answers