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 Professional Discussion / how can I move my object in the direction I want?

Author
Message
Wanja
17
Years of Service
User Offline
Joined: 28th Aug 2002
Location:
Posted: 19th Sep 2002 02:34
code:

do
fix object pivot 1
if leftkey()=1 then turn object left 1, Velocity
if rightkey()= 1 then turn object right 1, Velocity
if downkey()=1 then pitch object up 1, Velocity
if upkey()=1 then pitch object down 1, Velocity
if inkey$()="," then roll object left 1, Velocity
if inkey$()="." then roll object right 1, Velocity
move object 1 , Speed
loop

How could I get my model to move into the direction I turned it? Thanks in advance
jburrows
17
Years of Service
User Offline
Joined: 7th Sep 2002
Location:
Posted: 19th Sep 2002 05:37
Well first you need rotate the object using the rotate object command so that it pointed in the direction you want the object to go.

Then use the move command it will in the direction you want at the distance you want.

Login to post a reply

Server time is: 2019-09-18 12:51:31
Your offset time is: 2019-09-18 12:51:31