On Sat, 2009-01-24 at 14:59 +1300, James Sleeman wrote: > Is there a property one can read which gives the distance to the > camera/observer specifically in the external views, I've hunted through > the property browser but I can't see anything like it. > > I'd like to have some Nasal which can do something based on how far away > the aircraft is from the "person" watching it. > > --- > James Sleeman
sim/current-view/target-x-offset-m sim/current-view/target-y-offset-m sim/current-view/target-z-offset-m is where you're looking at in relation to to the main model sim/current-view/x-offset-m sim/current-view/y-offset-m sim/current-view/z-offset-m is where you're looking from... So ((x-offset-m - target-x-offset-m)^2 + (y-offset-m - target-y-offset-m)^2 + (z-offset-m - target-z-offset-m)^2 ) ^0.5 ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel