Panda3D
Public Member Functions | Public Attributes | List of all members
Arrival Class Reference

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. More...
 
LVecBase3 do_arrival ()
 This function performs the arrival and returns an arrival force which is used in the calculate_prioritized function. More...
 

Public Attributes

AICharacter_ai_char
 
LVecBase3 _arrival_direction
 
double _arrival_distance
 
bool _arrival_done
 
NodePath _arrival_target
 
LVecBase3 _arrival_target_pos
 
bool _arrival_type
 

Detailed Description

Definition at line 22 of file arrival.h.

Member Function Documentation

◆ arrival_activate()

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 89 of file arrival.cxx.

References NodePath::get_pos(), AIBehaviors::is_on(), AIBehaviors::pause_ai(), AIBehaviors::turn_off(), and AIBehaviors::turn_on().

Referenced by AIBehaviors::calculate_prioritized().

◆ do_arrival()

LVecBase3 Arrival::do_arrival ( )

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 32 of file arrival.cxx.

References NodePath::get_pos().

Referenced by AIBehaviors::calculate_prioritized().


The documentation for this class was generated from the following files: