Ok so I'm trying to make just a basic plane flying simulation. I've got all the controls mapped out but i can't seem to keep the plane from flying under the ground. Can someone give me a suggestion on an if/else statement to use? It'd be appreciated.

Ok so I'm trying to make just a basic plane flying simulation. I've got all the controls mapped out but i can't seem to keep the plane from flying under the ground. Can someone give me a suggestion on an if/else statement to use? It'd be appreciated.

Zack

There is a "distance above [object]" function you can call for any given object. I'd incoporate that and some sort of inequality (>, <, etc.) in an if statement.

Hey, I'm sorry but I took your program and just got a little carried away while fixing it

Its not much but I think it makes your game a little smoother and more life-like. There is more that I could incorporate such as a steady decrease in speed instead of an abrupt stop, and a few other things that have to do with speed.