I’m trying to create a view to chase an AI aircraft.  I’m not sure how to specify the model index of the AI craft for the lookat code.  If I specify index 0, the camera moves with the AI craft but is always facing the user’s plane.

 

Here’s a snippit:

 

<type>lookat</type>

    <config>

      <from-model type="bool">true</from-model>

      <from-model-idx type="int">0</from-model-idx>

      <eye-lat-deg-path>/position/latitude-deg</eye-lat-deg-path>

      <eye-lon-deg-path>/position/longitude-deg</eye-lon-deg-path>

      <eye-alt-ft-path>/position/altitude-ft</eye-alt-ft-path>

      <eye-pitch-deg-path>/orientation/pitch-deg</eye-pitch-deg-path>

      <eye-roll-deg-path>/orientation/roll-deg</eye-roll-deg-path>

      <eye-heading-deg-path>/orientation/heading-deg</eye-heading-deg-path>

 

      <at-model type="bool">true</at-model>

      <at-model-idx type="int">0</at-model-idx> //this points to the player’s plane. Bad.

    

      <at-model-roll-damping type="double">1.8</at-model-roll-damping>

      <at-model-pitch-damping type="double">1.8</at-model-pitch-damping>

      <at-model-heading-damping type="double">1.8</at-model-heading-damping>

      <target-z-offset-m type="double">0</target-z-offset-m>

 

 

Thanks,

Vance

 

 

_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to