21 _seek_position = target_object.
get_pos(_ai_char->_window_render);
22 _seek_weight = seek_wt;
24 _seek_direction = _seek_position - _ai_char->_ai_char_np.
get_pos(_ai_char->_window_render);
34 _seek_weight = seek_wt;
36 _seek_direction = _seek_position - _ai_char->_ai_char_np.
get_pos(_ai_char->_window_render);
55 double target_distance = (_seek_position - _ai_char->_ai_char_np.
get_pos(_ai_char->_window_render)).length();
57 if(
int(target_distance) == 0) {
59 _ai_char->_steering->_steering_force =
LVecBase3(0.0, 0.0, 0.0);
60 _ai_char->_steering->
turn_off(
"seek");
64 LVecBase3 desired_force = _seek_direction * _ai_char->_movt_force;
65 return(desired_force);
This is the base class for all three-component vectors and points.
void turn_off(string ai_type)
This function turns off any aiBehavior which is passed as a string.
LPoint3 get_pos() const
Retrieves the translation component of the transform.
bool normalize()
Normalizes the vector in place.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
LVecBase3 do_seek()
This function performs the seek and returns a seek force which is used in the calculate_prioritized f...