Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

How to code anywhere below -10?

$
0
0
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?

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>