![]() |
VR-Forces Developer's Guide
|
There are a few ground vehicle movement systems (including ground-tracked, ground-tracks-amphibious, ground-wheels-off-road, and ground-wheels-road), each defined by sysdef files that can be found in data.
They are configured differently from one another, but they all follow the same general model. A number of controllers and Lua scripts are responsible for exucuting the various movement tasks available to the vehicle, with the actuator ultimately responsible for updating the entity's spatial attributes based on the control input from one of the low level controllers.
In addition to the individual ground vehicle movement systems, there are also systems for handling unit movement.
There are many controllers in these systems. Not all will be covered here, but below is a list of some of the key ones.
| Ground Vehicle Controllers | |
|---|---|
| Controller | Purpose |
| ground-auto-move-to-controller | Performs the low level move-to-direct task, which does not do any path planning. |
| ground-auto-move-along-controller | Performs the low level move-along task to move along routes. |
| road-movement-controller | Performs movement along road networks. |
| maneuver-in-formation-controller | Used in coordinated unit maneuvers, to prevent the vehicle from getting to far from the others. |
| ground-move-to-adapter | Upgrades old move-to-location and move-to tasks to new ground movement tasks. |
| navigation-preference-controller | Controls whether vehicles prefer to travel on roads or ignore roads. |
| script-enable-controller | Enables the Lua scripts that are involved in ground vehicle movement. |
The primary movement system for ground units is the ground-disaggregated-movement system. This system is responsible for implementing movement tasks at the unit level, which ultimately sends tasks to its individual subordinates.
| Ground Vehicle Unit Controllers | |
|---|---|
| Controller | Purpose |
| aggregate-maneuver-to-controller | Performs the maneuver-to task, which coordinates entity movements to prevent them from getting too far apart. |
| aggregate-maneuver-along-controller | Performs the maneuver-along task, which coordinates entity movements to prevent them from getting too far apart. |
| aggregate-move-along-adapter-controller | Upgrades the old move-along task to the new maneuver-along. |
| convoy-task-controller | Performs a unit convoy task. |
| navigation-preference-controller | Controls whether vehicles prefer to travel on roads or ignore roads. |
| script-enable-controller | Enables the Lua scripts that are involved in ground vehicle unit movement. |
The ground vehicle movement tasks are dependent on one another. The higher level tasks build upon the lower level tasks to implement more complex behaviors. Many of the higher level tasks make use of the Lua API's Behavior Engine.
The diagram below shows how these tasks are related to one another. It shows both individual and unit tasks. Subtasks are lower level tasks that are performed by the calling simulation object. Subordinate tasks are tasks sent to a subordinate entity by a unit. User tasks are those available on the GUI, while others can only be called as subtasks from code or scripts.