On 12/12/02 at 8:38 AM ace project wrote:
>I got Flight Gear to show the model a hour ago, I made
>some *stupid* mistake reading out a variable from a
>function (which forgot to copy a variable and it
>default was wrong). I fixed that bug a couple of days
>ago but it came back to hunt me :(
>
>
>Now I have a plane in my sight, letting it fly is the
>next goal. If the FGModelPlacement.update() capable of
>this or is it never tested before ?

Sure, its capable of this - download w120n30 and try fgfs --airport-id=KEMT
--heading=10 --prop:"/sim/ai-traffic/enabled"=true (from about Flightgear
0.9.0 onwards).

You've done the hard part - the rest is easy!  Just call
FGModelPlacement.setPosition(...), FGModelPlacement.setOrientation(...) and
FGModelPlacement.update(...) every time you want the plane to move (which
I've wrapped up in a Transform() function in my example).  I do this at the
sim's native 120Hz for the AI plane and it doesn't affect frame rate much.
There's probably scope to be clever and decrease the update frequency as
the distance to the viewer increases.

>
>(Plz note that my 2nd PC is a AMD Athlon 550mhz with
>384mb RAM and a slow Matrox G450 16mb that is running
>Flight Gear at only 4 to 16 fps (OS Debian Woody))
>

Your texture RAM is probably the bottleneck, especially if you start
drawing extra models.  If you're using 32bpp then try switching to 16bpp.
FWIW, I can get consistant 30fps at the default startup location on a
350MHz pentium with a 64MB Geforce3.

Cheers - Dave




_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to