Board index FlightGear Multiplayer events

Detect Multiplayer collision

Virtual fly-ins, fun flies, competitions, and other group events. Find out details of upcoming events, register for competitions, or organize your own tour of a favorite location.

Detect Multiplayer collision

Postby Raj » Sun Dec 27, 2020 4:34 am

Hi, I am new to flight gear. I have noticed that during multiplayer or even single player, those aircraft can go through each other without colliding each other.
Is there any function to enable or disable this? Noticed that AI aircrafts, most of the buldings, hangers, etc can able to fly through without colliding.
Thanks in advance.
Raj
 
Posts: 2
Joined: Sun Dec 27, 2020 4:14 am

Re: Detect Multiplayer collision

Postby jomo » Sun Dec 27, 2020 10:19 am

Yes there is/was a "real" colliding!
I as ATC am glade that by default that is disabled - because there are more and more little idiots (of course mostly flying jets!) that need colliding with others to feel great - especially if others do not want to "play" with idiots!!
jomo / ATCjomo + EDDFjo + EDDFjo1 + EDDFjo2
ATC at EDDF Fr,Sa,Su,We from 20:00 to 24:00 CET/MEZ., see http://www.emmerich-j.de
User avatar
jomo
 
Posts: 1000
Joined: Thu Feb 12, 2009 7:46 pm
Location: Mainz, Germany
Callsign: jomo EDDFjo1+2
OS: UBUNTU 18.4

Re: Detect Multiplayer collision

Postby Hooray » Sun Dec 27, 2020 12:25 pm

you could certainly compute a bounding box/sphere for different aircraft and then do some collision detection fgfs/fgms-side - animating the whole thing or modeling actual crash behavior is a completely different issue though. However, you could definitely hack fgms to drop clients once they "collide" or modify fgfs to automatically return to the original airport/runway (basically a reset/reposition)

Many of these things could be implemented without requiring C++ changes - and even collision detection could be only executed for aircraft that are within a certain given range, so that there's not too much overhead for aircraft outside the given range - you could use Nasal or property rules for this kind of scheme

Obviously, a more sophisticated scheme would not just use a single 3D sphere as the bounding box, but actually use different 3D volumes for different parts of the fuselage - which would make things much more realistic for people interested in aerobatics or combat aircraft.

We certainly have the expertise around to prototype such a scheme here on the forum - as a matter of fact, I think aircraft dimensions may even be encoded in some -set.xml files (?)
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Detect Multiplayer collision

Postby cgdae » Sun Dec 27, 2020 3:25 pm

Raj wrote in Sun Dec 27, 2020 4:34 am:Hi, I am new to flight gear. I have noticed that during multiplayer or even single player, those aircraft can go through each other without colliding each other.
Is there any function to enable or disable this? Noticed that AI aircrafts, most of the buldings, hangers, etc can able to fly through without colliding.
Thanks in advance.


I think there's support for this: http://wiki.flightgear.org/Howto:Multip ... ultiplayer

I haven't tried it recently, but it used to work.

Hope that helps,

- Jules
cgdae
 
Posts: 117
Joined: Tue May 31, 2016 8:35 pm

Re: Detect Multiplayer collision

Postby jomo » Mon Dec 28, 2020 11:36 am

cgdae wrote in Sun Dec 27, 2020 3:25 pm:
Raj wrote in Sun Dec 27, 2020 4:34 am:Hi, I am new to flight gear. I have noticed that during multiplayer or even single player, those aircraft can go through each other without colliding each other.

That is exactly how it should be! There are more and more newbies who believe they are the greatest if the can destruct others! It very definitely should not be possible that somebody can disable others (e.g. holding in front of somebody so that the other (good guy) cannot taxi or TakeOff, shooting others out of the sky, bombing others, etc.). Of cores dog-fights and similar should be allowed - but only if the opposite guy agrees!!! Watch e.g. film http://www.emmerich-j.de/EDDF/Films/202 ... 55-113.mp4 starting at film-minute 9:20 thru to 13). He is at the moment the most "little/big idiot" that tries to destroy our simulations. By now most visitors know about that "little/big idiot" - even if he changes his ID's very often.
I believe 99.999 % of all of us agree that such idiots should not be allowed to destroy multiplayer events - just because ...???
jomo / ATCjomo + EDDFjo + EDDFjo1 + EDDFjo2
ATC at EDDF Fr,Sa,Su,We from 20:00 to 24:00 CET/MEZ., see http://www.emmerich-j.de
User avatar
jomo
 
Posts: 1000
Joined: Thu Feb 12, 2009 7:46 pm
Location: Mainz, Germany
Callsign: jomo EDDFjo1+2
OS: UBUNTU 18.4

Re: Detect Multiplayer collision

Postby cgdae » Mon Dec 28, 2020 12:49 pm

jomo wrote in Mon Dec 28, 2020 11:36 am:
Raj wrote in Sun Dec 27, 2020 4:34 am:Hi, I am new to flight gear. I have noticed that during multiplayer or even single player, those aircraft can go through each other without colliding each other.

That is exactly how it should be! There are more and more newbies who believe they are the greatest if the can destruct others! It very definitely should not be possible that somebody can disable others (e.g. holding in front of somebody so that the other (good guy) cannot taxi or TakeOff, shooting others out of the sky, bombing others, etc.). Of cores dog-fights and similar should be allowed - but only if the opposite guy agrees!!! Watch e.g. film http://www.emmerich-j.de/EDDF/Films/202 ... 55-113.mp4 starting at film-minute 9:20 thru to 13). He is at the moment the most "little/big idiot" that tries to destroy our simulations. By now most visitors know about that "little/big idiot" - even if he changes his ID's very often.
I believe 99.999 % of all of us agree that such idiots should not be allowed to destroy multiplayer events - just because ...???

I think there's a misunderstanding here.

Setting /sim/multiplay/hot=true only affects one's own aircraft. It does not change other peoples' Flightgear sessions.

- Jules
cgdae
 
Posts: 117
Joined: Tue May 31, 2016 8:35 pm

Re: Detect Multiplayer collision

Postby Jordan90 » Sat Mar 27, 2021 12:43 pm

Now, how can I check for collision detection on a ground-to-player basis on the server? It's fairly easy if the ground is a flat space, I just check if the player's z coordinate is lower than some value, and voila, but, what if the map/ground itself is a model? How do I know where hills are on the server-side? How do I know when object collisions happen?
Jordan90
 
Posts: 1
Joined: Sat Mar 27, 2021 11:00 am

Re: Detect Multiplayer collision

Postby Hooray » Sat Mar 27, 2021 1:19 pm

Jordan90 wrote in Sat Mar 27, 2021 12:43 pm:How do I know where hills are on the server-side? How do I know when object collisions happen?


Basically, you don't - unless you do some client-size calculations and forward those to the server.
Alternatively, you could hack fgms to access a local copy of the whole terrain/scenery database (aka ALL terrain tiles)
and then use the fgelev tool and related sources to compute the corresponding bounding boxes.

Also note that while most people will be satisfied using a simple BB approach, those doing aerobatics or military flying will require very different methods/data resolutions. Similairly, helicopter/VTOL folks will have different "collision detection" requirements, too.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Multiplayer events

Who is online

Users browsing this forum: No registered users and 3 guests