2023-01-13 22:04:30 +01:00
|
|
|
#ifndef GSAI_ARRIVE_H
|
|
|
|
#define GSAI_ARRIVE_H
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-14 02:47:55 +01:00
|
|
|
#include "core/object/reference.h"
|
|
|
|
|
|
|
|
#include "../gsai_steering_behavior.h"
|
|
|
|
|
|
|
|
class GSAIAgentLocation;
|
|
|
|
|
2023-01-13 21:13:57 +01:00
|
|
|
class GSAIArrive : public GSAISteeringBehavior {
|
2023-01-13 21:35:07 +01:00
|
|
|
GDCLASS(GSAIArrive, GSAISteeringBehavior);
|
|
|
|
|
|
|
|
public:
|
2023-01-14 02:47:55 +01:00
|
|
|
Ref<GSAIAgentLocation> get_target();
|
|
|
|
void set_target(const Ref<GSAIAgentLocation> &val);
|
2023-01-13 21:35:07 +01:00
|
|
|
|
|
|
|
float get_arrival_tolerance() const;
|
|
|
|
void set_arrival_tolerance(const float val);
|
|
|
|
|
|
|
|
float get_deceleration_radius() const;
|
|
|
|
void set_deceleration_radius(const float val);
|
|
|
|
|
|
|
|
float get_time_to_reach() const;
|
|
|
|
void set_time_to_reach(const float val);
|
|
|
|
|
2023-01-14 02:47:55 +01:00
|
|
|
void arrive(const Ref<GSAITargetAcceleration> &acceleration, const Vector3 &target_position);
|
|
|
|
virtual void _arrive(Ref<GSAITargetAcceleration> acceleration, Vector3 target_position);
|
|
|
|
|
|
|
|
void _calculate_steering(Ref<GSAITargetAcceleration> acceleration);
|
2023-01-13 21:35:07 +01:00
|
|
|
|
|
|
|
GSAIArrive();
|
|
|
|
~GSAIArrive();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
static void _bind_methods();
|
|
|
|
|
2023-01-14 02:47:55 +01:00
|
|
|
Ref<GSAIAgentLocation> target;
|
|
|
|
float arrival_tolerance;
|
|
|
|
float deceleration_radius;
|
|
|
|
float time_to_reach;
|
2023-01-13 21:13:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|