Reachedpos bbox expansion: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Tels (talk | contribs)
add
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
The '''reachedpos_bbox_expansion''' spawnarg is meant for small AI like rats, mice, birds etc.  
The '''reachedpos_bbox_expansion''' spawnarg is meant to be used for small AI like rats, mice, birds etc.  
It adjusts the [[bbox] around the target position of a goal, so that even AI with a small bounding box
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.  
will be able to reach their target.  


Without that adjustment, the might never get to their target as the approach it, but the target stays all the time outside the AIs box due to their turning not being fast enough. This causes the AI to reach a stable orbit around the target point and is
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.
usually not wha one wants.


The default is 0, and the value is in units. A value of 1..3 is usually sufficient.  
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.
There should be no need to use this spawnarg on any entities in the editor.


{{tdmspawnargs}}
{{tdmspawnargs}}

Latest revision as of 12:00, 6 June 2008

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.