> For the complete documentation index, see [llms.txt](https://docs.bestway.com.ua/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bestway.com.ua/game-settings/configuration-of-movement-types-for-human-units.md).

# Configuration of movement types for human units

The movement speeds of units of the `human` type are configured in the file: `/scene/properties/human.ext`\
The `Chassis` extender, located within the file, defines the movement types in blocks:

* `Crawl` (crawling)
* `Swim` (swimming)
* `Run` (main movement type)
* `Strafe` (lateral movement)

Each movement type contains a set of movement modes.\
These descriptions include parameters for movement speed, animation speed, turning speed, and other components defining unit movement.

Units of measurement for speed parameters:

* movement speed S=\[km/h];
* animation speed A=\[km/h];
* turn rate in degrees per second rotation \[degree/s].

The animation playback speed (`Sa`) for unit movement in the game is calculated using the following formula:

$$
Sa = S/A\*As
$$

where `As` is the animation scale factor.

## Movement types description

### Crawl and swim movement types

The crawling `Crawl` and swimming `Swim` description blocks include three movement modes, which differ in movement speed:

* `Slow` — slow movement when the unit is tired or injured;
* `Normal` — normal speed;
* `Fast` — accelerated movement by the player's command.

### Main movement type

The `Run` block describes several movement modes, adapting to the unit's state and received commands.

* **Walking modes**\
  Units employ walking modes for patrolling or carrying heavy objects with one hand (e.g., a jerrycan) or both hands (e.g., a crate or a corpse).\
  Key walking modes:
  * `Spot` and `Sneak`: used by AI-controlled units for searching hidden enemies.
  * `Walk`: represents relaxed or encumbered walking.
* **Slow run mode**\
  The `Slow` mode automatically activates when unit states impose movement speed limitations, such as fatigue or traversing difficult terrain.
* **Normal run mode**\
  The `Normal` mode provides moderate running intensity, triggered in situations like fatigue or challenging terrain. It differs from `Slow` mode in speed parameters.
* **Sprinting modes**\
  The sprinting modes are the primary movement modes for `human` units.\
  Variants include:
  * `Fast`: used during combat unless the `charge` command is issued for accelerated movement.
  * `Assault`: activated by the `charge` command, enabling shooting while running. Commonly used for advancing under fire or attacking from cover.
  * `Bow`: triggered by the `withdraw` command, preventing shooting while running. Typically used for retreating or taking cover during escape.

{% hint style="info" %}
In mission scripts, `Fast` and `Assault` are the most frequently employed modes.
{% endhint %}

### Aiming movement

`Strafe` is a movement type representing walking or running while aiming.\
It is used by AI-controlled units for short-distance movements during combat.

The aiming movement description block specifies not only the speeds but also the names of animations for both the upper and lower parts of the body during movement.

{% hint style="info" %}
The `Strafe` mode cannot be activated or deactivated via mission scripts.
{% endhint %}

## Example of movement parameters configuration

```
{Chassis "foot"
	;	 	S(km/h)  A(km/h) rotation(degree/s)
	{Crawl
		{Slow      3.00   5   100 }
		{Normal    3.75   5   200 }
		{Fast      5.25   5   200 }
	}
	{Swim
		{Slow      1.50   5   200 }
		{Normal    2.25   5   200 }
		{Fast      3.75   5   200 }
	}
	{Run
		{Sneak     3.75   2   400 }   ; x 0.85
		{Spot      4.50   2   400 }   ; x 0.5
		{Walk      5.25   1.8 400 }   ; x 0.48
		{Slow      6.00   3   800 }   ; x 1
		{Normal   10.50   5   800 }   ; x 0.55
		{Fast     13.50   7   800 }   ; x 0.33
		{Bow      20.25   7  1200 }   ; x 0.55
	}
	{Strafe
		;	m  m+v  km/h  	speed   animation up               animation down
		{Forth   3  2 0   6.50   3     "walk_spot_gun_up_1"    "walk_spot_gun_down_1"}   ; 6.5 km/h move 2 km/h animation 0.37 scale --> in Run
		{Forth   3  2 1  11.00   1     "run_spot_gun_up"       "run_spot_gun_down"}
		{Forth   8  0 0  13.20   1.2   "run_spot_gun_up"       "run_spot_gun_down"}
		{Left    4  0 0  10.50   1.22  "run_spot_back-strafe_gun_up"   "run_spot_back-strafe_gun_down"}
		{Right   8  0 0  13.00   1.1   "run_spot_left-strafe_gun_up"   "run_spot_left-strafe_gun_down"}
		{Back    8  0 0  10.50   1.22  "run_back_spot_gun_up"   "run_back_spot_gun_down"}
	}
}
```
