|
| | Flee (AICharacter *ai_ch, LVecBase3 pos, double panic_distance=10.0, double relax_distance=10.0, float flee_wt=1.0) |
| |
| | Flee (AICharacter *ai_ch, NodePath target_object, 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.
|
| |
| void | flee_activate () |
| | This function checks for whether the target is within the panic distance.
|
| |
Definition at line 22 of file flee.h.
◆ Flee() [1/2]
| Flee::Flee |
( |
AICharacter * | ai_ch, |
|
|
NodePath | target_object, |
|
|
double | panic_distance = 10.0, |
|
|
double | relax_distance = 10.0, |
|
|
float | flee_wt = 1.0 ) |
◆ Flee() [2/2]
| Flee::Flee |
( |
AICharacter * | ai_ch, |
|
|
LVecBase3 | pos, |
|
|
double | panic_distance = 10.0, |
|
|
double | relax_distance = 10.0, |
|
|
float | flee_wt = 1.0 ) |
◆ ~Flee()
◆ do_flee()
| 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().
◆ flee_activate()
| 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.
◆ _ai_char
◆ _flee_activate_done
| bool Flee::_flee_activate_done |
◆ _flee_direction
| LVecBase3 Flee::_flee_direction |
◆ _flee_distance
| double Flee::_flee_distance |
◆ _flee_done
◆ _flee_position
| LVecBase3 Flee::_flee_position |
◆ _flee_present_pos
| LVecBase3 Flee::_flee_present_pos |
◆ _flee_relax_distance
| double Flee::_flee_relax_distance |
◆ _flee_weight
The documentation for this class was generated from the following files: