- Home /
Question by
gmamafilms · Nov 23, 2016 at 07:32 AM ·
heightfallingdeathy-axiskill player
Death when a character hits the ground from a certain height
I'm trying to make my character die when they hit the ground from a height of 4. Can some please help me out I know I'm on the right path, but I can't figure this part out.
public Transform playerPos;
// Update is called once per frame
void Update () {
if (playerPos.position.y > 4)
yield return new WaitUntil(playerPos.position.y = 0);
print("player had died");
}
please help me.
Comment