Reachedpos bbox expansion

From The DarkMod Wiki
Jump to navigationJump to search

The reachedpos_bbox_expansion spawnarg is meant to be used for small AI like rats, mice, birds etc. It expands the AI's bbox when the code calculates whether the goal position has been reached, so that even AI with a small bounding box will be able to reach their target.

Without that adjustment, the game code might never consider the target as "reached", because the goal position stays outside of the AIs bounding box at all times. Fast-moving AI in combination with a constant turning rate will cause the AI to reach a stable orbit around the target point (often forever). The code tries to prevent such a case, but it is still possible to achieve this effect.

The default is 0, and the value is in units. A value of 1..3 is usually sufficient. There should be no need to use this spawnarg on any entities in the editor.