Board index FlightGear Support Multiplayer

How to force FlightGear to render MP aircrafts.

Trouble getting online, setting up a server?
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- copy&paste your commandline.

Please, also see Requesting Technical Help.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

How to force FlightGear to render MP aircrafts.

Postby Soi » Thu May 12, 2016 3:13 am

Hi,
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
Last edited by Johan G on Thu May 12, 2016 6:31 am, edited 1 time in total.
Reason: Please use [code] tags for source code. They can be added manually or by using the [^_ ] button.
Soi
 
Posts: 45
Joined: Wed May 21, 2014 6:17 am
Location: Australia
Callsign: soi
Version: 3.2
OS: Windows

Re: How to force FlightGear to render MP aircrafts.

Postby PINTO » Thu May 12, 2016 6:00 pm

Wait, so you've essentially made a custom "model view" view? Why not just use model view?

Also, sometimes it just takes a little bit for far-off models to load. Check your LOD settings, and beyond that just be a little patient.
Actively developing the MiG-21bis (github repo) (forum thread) (dev discord) (fg wiki)

http://opredflag.com is an active flightgear dogfighting community (using a system that isn’t bombable)
User avatar
PINTO
 
Posts: 966
Joined: Wed Oct 21, 2015 7:28 pm
Callsign: pinto
Version: stable
OS: Win10

Re: How to force FlightGear to render MP aircrafts.

Postby Parnikkapore » Fri May 13, 2016 12:24 am

It's the cam assistant,mot the model view. We can center the view on ANY model.
There are free alternatives to (almost) every program you encounter. You just have to find them.
Parnikkapore
 
Posts: 929
Joined: Thu Oct 29, 2015 11:16 am
Callsign: HS-FGS
Version: next
OS: Kubuntu

Re: How to force FlightGear to render MP aircrafts.

Postby Soi » Fri May 13, 2016 2:46 am

Hi PINTO,
My custom view provides extra features such as left-mouse zooming and centre the next model via the keyboard.
Soi
Soi
 
Posts: 45
Joined: Wed May 21, 2014 6:17 am
Location: Australia
Callsign: soi
Version: 3.2
OS: Windows

Re: How to force FlightGear to render MP aircrafts.

Postby Parnikkapore » Fri May 13, 2016 2:28 pm

Cool,I'd like this code sent to Marius_A!

(Yeah, for include in FGcamera)
There are free alternatives to (almost) every program you encounter. You just have to find them.
Parnikkapore
 
Posts: 929
Joined: Thu Oct 29, 2015 11:16 am
Callsign: HS-FGS
Version: next
OS: Kubuntu


Return to Multiplayer

Who is online

Users browsing this forum: No registered users and 5 guests