VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
4.13 - The Hostility Manager

The Hostility Manager (DtHostilityManager, in hostilityManager.h) is a single, centralized manager owned by the Simulation Manager.

It keeps track of hostility relationships between different forces. Each force can be hostile to any of the other forces. However, the relationships are not reciprocal. For example, Force A could be hostile toward Force B without Force B being hostile to Force A.

Force hostility is used for entity detection and target selection. By default, sensors only detect targets toward which their parent entity is hostile. Similary, only hostile entities are selected as targets.

By default, Force Friendly and Force Opposing are mutually hostile to each other. You can change the default hostility relationships by editing the forceHostilty.mtl file for the simulation model set you are using (for example, ./data/simulationModelSets/default/forceHostilty.mtl). You can change force hostility during runtime. The settings are saved as part of the scenario. The hostility loaded with a scenario overrides the hostility loaded by the simulation model set's hostility file.

You can access the Hostility Manager from the Simulation Manager using the hostilityManager() member function. The following example sets Force Friendly to be hostile to Force Neutral:

simManager()->hostilityManager()->setHostility(DtForceFriendly, DtForceNeutral, true);

[<< Entity Communication Page] [Home] [Top of Page] [DI-Guy Integration >>]


Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)