Create height system

My only concern is you are only checking the players position during the simpleInitApp() which will only be evaluated once. If you are wanting to turn the audio on after initializing (say player spawns at a height of 10 and falls down to 0) you need to check the players height in the update loop.

Also it should be noted it’s not a good idea to compare floats with ==, floats are almost never exactly equal since they drift a lot (You’ll get 0.000001 more often than 0.0) Instead whenever possible check for greater or less than, or specify a range of valid floats (within 0.5 wu of 0 would be (y>-0.25f && y<0.25f)

:see_no_evil: :hear_no_evil: :speak_no_evil:

Baba you need read wiki first and learn what is “simpleInitApp” and “simpleUpdate”.

You make basic mistakes, and i understand you are new, but you need learn a little first, before doing game.

So you will avoid rewriting it 999 times.

everyone started like you before, but its wrong way you try to learn. you should learn from good existing examples.(see some opensource libs/games/etc or some books, or any other good resources)

even if it will work properly, it make error logarithmic increase - very high the bigger project will be. (it mean, if you dont design it proper way, the more you will add, the much more problem you will have.