Public Member Functions | |
| Flee (AICharacter *ai_ch, NodePath target_object, double panic_distance=10.0, double relax_distance=10.0, float flee_wt=1.0) | |
| Flee (AICharacter *ai_ch, LVecBase3 pos, double panic_distance=10.0, double relax_distance=10.0, float flee_wt=1.0) | |
| LVecBase3 | do_flee () | 
| This function performs the flee and returns a flee force which is used in the calculate_prioritized function.  More... | |
| void | flee_activate () | 
| This function checks for whether the target is within the panic distance.  More... | |
Public Attributes | |
| AICharacter * | _ai_char | 
| bool | _flee_activate_done | 
| LVecBase3 | _flee_direction | 
| double | _flee_distance | 
| bool | _flee_done | 
| LVecBase3 | _flee_position | 
| LVecBase3 | _flee_present_pos | 
| double | _flee_relax_distance | 
| float | _flee_weight | 
| LVecBase3 Flee::do_flee | ( | ) | 
This function performs the flee and returns a flee force which is used in the calculate_prioritized function.
In case the AICharacter is past the (panic + relax) distance, it resets to flee_activate. This function is not to be used by the user.
Definition at line 53 of file flee.cxx.
References NodePath::get_pos().
| void Flee::flee_activate | ( | ) | 
This function checks for whether the target is within the panic distance.
When this is true, it calls the do_flee function and sets the flee direction. This function is not to be used by the user.
Definition at line 81 of file flee.cxx.
References NodePath::get_pos(), AIBehaviors::turn_off(), and AIBehaviors::turn_on().
 1.8.15