I have written MyView.xml file to allow the user to centre at the selected MP aircraft using generic protocol mechanism.
Below is the nasal script the move the camera to the selected MP.
- Code: Select all
# center_entity.nas (save in $FG_ROOT/Nasal)
var center_entity = func()
{
var feNode = props.globals.getNode("my_node/center_entity");
globals["my-model-view"].model_view_handler.centerByCallsign(feNode.getValue());
}
# sets up a signal handler that listens to the /my_node/center_entity property and once it changes,
_setlistener("/my_node/center_entity", center_entity);
The selected MP sometimes is invisible in FlightGear, especially where there are many position packets received by the MP protocol.
Is it possible to force FlightGear to render the selected MP or similar method?
Thanks in advance,
Soi