Public Member Functions | |
Evade (AICharacter *ai_ch, NodePath target_object, double panic_distance, double relax_distance, float evade_wt) | |
LVecBase3 | do_evade () |
This function performs the evade and returns an evade force which is used in the calculate_prioritized function. More... | |
void | evade_activate () |
This function checks for whether the target is within the panic distance. More... | |
Public Attributes | |
AICharacter * | _ai_char |
bool | _evade_activate_done |
LVecBase3 | _evade_direction |
double | _evade_distance |
bool | _evade_done |
double | _evade_relax_distance |
NodePath | _evade_target |
float | _evade_weight |
LVecBase3 Evade::do_evade | ( | ) |
This function performs the evade and returns an evade force which is used in the calculate_prioritized function.
In case the AICharacter is past the (panic + relax) distance, it resets to evade_activate. This function is not to be used by the user.
Definition at line 38 of file evade.cxx.
References NodePath::get_pos().
void Evade::evade_activate | ( | ) |
This function checks for whether the target is within the panic distance.
When this is true, it calls the do_evade function and sets the evade direction. This function is not to be used by the user.
Definition at line 67 of file evade.cxx.
References NodePath::get_pos(), AIBehaviors::turn_off(), and AIBehaviors::turn_on().