Panda3D
Public Member Functions | Public Attributes

Evade Class Reference

List of all members.

Public Member Functions

 Evade (AICharacter *ai_ch, NodePath target_object, double panic_distance, double relax_distance, float evade_wt)
LVecBase3f do_evade ()
 This function performs the evade and returns an evade force which is used in the calculate_prioritized function.
void evade_activate ()
 This function checks for whether the target is within the panic distance.

Public Attributes

AICharacter_ai_char
bool _evade_activate_done
LVecBase3f _evade_direction
double _evade_distance
bool _evade_done
double _evade_relax_distance
NodePath _evade_target
float _evade_weight

Detailed Description

Definition at line 24 of file evade.h.


Member Function Documentation

LVecBase3f 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 45 of file evade.cxx.

References NodePath::get_pos(), LVecBase3f::length(), LVecBase3f::normalize(), AIBehaviors::turn_off(), and AIBehaviors::turn_on().

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 78 of file evade.cxx.

References NodePath::get_pos(), LVecBase3f::length(), AIBehaviors::turn_off(), and AIBehaviors::turn_on().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations