Josh Babcock a écrit : > Roberto Inzerillo wrote: > >> I have a 3d object and I'd like to use a property out of the tree which >> gets me the distance between the point of view and the object itself, in >> order to apply an animation to that. Is there something like that >> available? >> >> > > > No, but there is an animation called dist-scale that uses that distance > to control the size of an object. So far I am unaware of any way to > specify an object and expose that value for it. It would be handy to be > able to get that info from a nasal call. >
Having such a property would mean that there would be a subtree for each object in the scenery. Quite impractical, isn't it ? The dist-scale animation compute a scale factor from the distance to the viewer. The flash animation compute a scale factor from the angle to the view direction. A question for Nasal expert : is nasal able to do vector and matrix computation ? If yes, there is a 'SGCustomTransform' class in simgear. For the moment, it requires a callback in C++ to compute the transformation matrix. We can imagine this matrix could be computed in a Nasal script inside the model's animation file. -Fred ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel