2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:29:17 +01:00
|
|
|
#include "gsai_evade.h"
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
// Calculates acceleration to take an agent away from where a target agent is;
|
|
|
|
// moving.;
|
|
|
|
// @category - Individual behaviors;
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
float GSAIEvade::_get_modified_acceleration() {
|
|
|
|
return -agent.linear_acceleration_max;
|
2023-01-13 21:13:57 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
GSAIEvade::GSAIEvade() {
|
|
|
|
}
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
GSAIEvade::~GSAIEvade() {
|
|
|
|
}
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
static void GSAIEvade::_bind_methods() {
|
|
|
|
ClassDB::bind_method(D_METHOD("_get_modified_acceleration"), &GSAIEvade::_get_modified_acceleration);
|
|
|
|
}
|