Having commands for setting the weapon and head direction of units is extremely useful for AI mods.
This game has a lot of potential for creating a really good AI. Like being able to look around, aiming the weapon at potential target positions, etc. Unfortunately, there are a lot of issues that make commands like doTarget/doWatch/lookAt/etc. useless for this purpose (see T144528 for one of these issues).
Requested commands:
```
unit setWeaponDirection direction
```
Which sets the aim direction of the unit (taking the `limitGunMovement` value of the animation into account, just like how the player changes aim using mouse)
Note that this command would behave similar to when you set "Aiming Deadzone" in Game settings to maximum. In other words, **the unit itself must NOT turn** (`vectorDir unit` must not change) and only the weapon must move in the hands.
And:
```
unit setHeadDirection direction
```
which sets the head direction (while also preventing awkward/invalid head directions). Similar to above, only the "head" must turn and the unit direction (vectorDir unit) doesn't change.
P.S: I'm not sure why there's no such feature in the game right now. If it's because people might be able to create aimbots and cheat with it, then I'm sure you know better than me that there are hundreds of other (and more effective) ways to cheat!