Q: When does pfDCS & pfSetChannelOffset occure?

New Message Reply Date view Thread view Subject view Author view

Eric Heft (eheft++at++dnaco.net)
Mon, 28 Jul 1997 19:06:15 -0400 (EDT)


Hi,

    I'm working on a flight simulator using perfly a the basis of this
code. . I've loaded an aircraft model into a DCS node which I use
pfDSCTrans and pfDSCRotate to move the aircraft around. I'm using
pfChanViewOffsets to have the camera move in response to the aircraft.
Using the following updateSim I expect the viewpoint to be somewhere
inside the model, instead the viewpoint seems to be trailing one
frame behind the model. The model and viewpoint seems to be
translating and rotating correctly.

void
updateSim(pfChannel *chan)
{
   /* ... all the perfly updateSim code ... */
   /* ... Stuff to read stick inputs and call the f15 dynamics ... */
   /* ... ship->rot contains current h,p,r rotations ... */
   /* ... ship->pos contains current x,y,z translations ... */
    
   pfDCSTrans(ship->dcs,ship->pos[0],ship->pos[1],ship->pos[2]);
   pfDCSRot(ship->dcs,ship->rot[0],ship->rot[1],ship->rot[2]);

   pfChanViewOffsets(Chan[0],ship->pos,ship->rot);
}

Thanks for any advise you may have.
Eric

=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:40 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.