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 / Free flight commands

Author
Message
Zed
23
Years of Service
User Offline
Joined: 20th Sep 2002
Location:
Posted: 3rd May 2003 18:29
Does anyone know if the free flight commands are fixed yet? I gave up on my project when I upgraded to DBP and they didn't work.
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 3rd May 2003 20:42
Not yet to my knowledge:
xrotate objects affects x object own axis
yrotate object affects y object own axis
zrotate object affects real world z object axis

pitch, turn and roll do not update object angles ( they remain = 0)

this should be the status so far, kinda hopeless for any coding..
Muddleglum
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: New Zealand
Posted: 4th May 2003 01:47
It 's probably easiest to wait for patch 5 as i am going to do (depending on reports).
But if you are desperate, and assuming pathc 4 free flight angles rotate correctly, you can get WORLD related angles for free flight objects.
Use the trick of 'moving' foward 1 unit, read the object newx,newy,newz positions. Then move object back same distance.

The direction in the world is
wrapvalue(atanfull(newx- object position x,newz-object position z))

Pitch is theoretically --
asin(objecty- newy)
but on my test, asin did only > 270 and < 90 correct out of 360.

I use pitch as a sine anyway (which you directly get by this method), but you could probably get the whole 360 by fiddling with the asin in the < 270 > 90 range.
Or using atanfull with a full trig /hypotenuse distance getting.

for ROll ..

turn object left 90
move object 1
read newy position
move object back
turn object right.

You are back where you started.
As above, use asin y co-ord difference to get the angles.
Or use them as i do, directly as a sine.


BTW. The db 113 read return of free flight angles are NOT those above.
113's supply the same object attitude as the free flight state, but are a composite of ordinary x,y z rotate. .. and do not necessarily relate to the world at all.


That MAY be some use !! ...or not

cheers .
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 4th May 2003 02:25
scorpyo, free flight commands DO update angles now with patch 4 (except for 'roll' command which set z angle to zero). Hopefully another patch or two and they might finally work!

Gronda, Gronda
Muddleglum
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: New Zealand
Posted: 4th May 2003 04:48
Thanks for that sonic .. Some of us have been waiting a loooong time.

I don't suppose you noticed if the angles are returned to give strict world direction and pitch for example .. or are they like the DB 113 angles ?
Phoenix
23
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 6th May 2003 03:49
This is my code for free flight movement.
hope it helps.



Not really sure if this is what your asking but this will let you fly around just as the camera in 3D space. But you have to add a loop of course which I didn't do.

Sit in reverie and watch the changing color of the waves that break upon the idle seashore of the mind.
Beta1
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location:
Posted: 6th May 2003 13:00
bugger. I was wondering why I couldnt make any sense of this last night.

Roll on the next patch....

And heres me with an almost finished terrain engine but with no free flight commands to fly around it with

Zed
23
Years of Service
User Offline
Joined: 20th Sep 2002
Location:
Posted: 6th May 2003 22:11
I don't need the angles returned. As long as the roll, pitch and turn do what they should, I calculate the objects orientation matrix. This is important because my AI etc works by calculating any objects possition relative to any other object.

ie: If object B is directly above object A but object B is pointing straight up then object A appears to be directly behind object B.

By the sounds of it this now works so I'll dust off my project and give it a try.

Zed
23
Years of Service
User Offline
Joined: 20th Sep 2002
Location:
Posted: 7th May 2003 10:20
Well, I guess you could call it progress. Before the only free flight commands that worked were the ones for the camera. Now the free flight commands for the objects work but not the camera.

On the upside, set object to camera orientation and set camera to object orientation appear to work now.

Roll on patch 5!

Login to post a reply

Server time is: 2026-07-11 08:47:04
Your offset time is: 2026-07-11 08:47:04