2023-01-13 21:13:57 +01:00
|
|
|
#ifndef GSAIPURSUE_H
|
|
|
|
#define GSAIPURSUE_H
|
|
|
|
|
|
|
|
class GSAIPursue : public GSAISteeringBehavior {
|
2023-01-13 21:35:07 +01:00
|
|
|
GDCLASS(GSAIPursue, GSAISteeringBehavior);
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
public:
|
|
|
|
GSAISteeringAgent get_ *target();
|
|
|
|
void set_ *target(const GSAISteeringAgent &val);
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
float get_predict_time_max() const;
|
|
|
|
void set_predict_time_max(const float val);
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
void _calculate_steering(const GSAITargetAcceleration &acceleration);
|
|
|
|
float get_modified_acceleration();
|
|
|
|
float _get_modified_acceleration();
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
GSAIPursue();
|
|
|
|
~GSAIPursue();
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
// Calculates an acceleration to make an agent intercept another based on the
|
|
|
|
// target agent's movement.
|
|
|
|
// @category - Individual behaviors
|
|
|
|
// The target agent that the behavior is trying to intercept.
|
|
|
|
GSAISteeringAgent *target;
|
|
|
|
// The maximum amount of time in the future the behavior predicts the target's
|
|
|
|
// location.
|
|
|
|
float predict_time_max = 1.0;
|
2023-01-13 21:13:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|