Panda3D
|
Public Member Functions | |
Arrival (AICharacter *ai_ch, double distance=10.0) | |
void | arrival_activate () |
This function checks for whether the target is within the arrival distance. | |
LVecBase3f | do_arrival () |
This function performs the arrival and returns an arrival force which is used in the calculate_prioritized function. | |
Public Attributes | |
AICharacter * | _ai_char |
LVecBase3f | _arrival_direction |
double | _arrival_distance |
bool | _arrival_done |
NodePath | _arrival_target |
LVecBase3f | _arrival_target_pos |
bool | _arrival_type |
void Arrival::arrival_activate | ( | ) |
This function checks for whether the target is within the arrival distance.
When this is true, it calls the do_arrival function and sets the arrival direction. This function is not to be used by the user.
Definition at line 100 of file arrival.cxx.
References NodePath::get_pos(), AIBehaviors::is_on(), LVecBase3f::length(), AIBehaviors::pause_ai(), AIBehaviors::turn_off(), and AIBehaviors::turn_on().
Referenced by AIBehaviors::calculate_prioritized().
This function performs the arrival and returns an arrival force which is used in the calculate_prioritized function.
In case the steering force = 0, it resets to arrival_activate. The arrival behavior works only when seek or pursue is active. This function is not to be used by the user.
Definition at line 39 of file arrival.cxx.
References NodePath::get_pos(), LVecBase3f::length(), LVecBase3f::normalize(), AIBehaviors::resume_ai(), AIBehaviors::turn_off(), and AIBehaviors::turn_on().
Referenced by AIBehaviors::calculate_prioritized().