Currently, I want to code my game so that when my player's position on the y-axis drops below -10, he is set to be inactive. My current idea is that it would look something like this:
if(gameObject.yaxis < -10)
{
gameObject.SetActive(false);
}
However, I am unsure of how to do this because I am relatively certain yaxis is not a property of gameObject.
Help please?
↧