Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Another problem with another program

Author
Message
Video Boy
21
Years of Service
User Offline
Joined: 21st Mar 2004
Location:
Posted: 11th Aug 2004 04:19 Edited at: 11th Aug 2004 04:20
This one is from a different program (made with DBC v1.13 too).

It is a simple free flight routine, where you can control the direction with the mouse, select your speed with the number keys and stop with the space bar. My intention at the end was to insert a control to avoid going below ground level; the problem is that, when you reach ground level, you can't move anymore, no matter what you do. Instead, what I have in mind to do is to stop when you reach ground level and to start moving again if VEL is >0 AND you look up (that is, any direction above horizontal). How do I fix it?
scout
20
Years of Service
User Offline
Joined: 27th Jul 2004
Location:
Posted: 11th Aug 2004 07:20 Edited at: 11th Aug 2004 07:20
one solution would be to set a flag if ur plane hits the ground.
if its set dont check for y position anymore and only move if
the angle is upwards. when ur plane gets higher than 0, then turn
the flag off and check the height again.

sry for my weak english... hope i helped.

scout

Login to post a reply

Server time is: 2025-05-25 10:22:15
Your offset time is: 2025-05-25 10:22:15