mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-04-14 23:58:26 +02:00
Behaviors cleanup part3.
This commit is contained in:
parent
6f27129fe5
commit
693ec871e5
@ -1,12 +1,16 @@
|
|||||||
|
|
||||||
#include "gsai_arrive.h"
|
#include "gsai_arrive.h"
|
||||||
|
|
||||||
GSAIAgentLocation GSAIArrive::get_ *target() {
|
#include "../gsai_steering_agent.h"
|
||||||
return *target;
|
#include "../gsai_target_acceleration.h"
|
||||||
|
#include "../gsai_utils.h"
|
||||||
|
|
||||||
|
Ref<GSAIAgentLocation> GSAIArrive::get_target() {
|
||||||
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSAIArrive::set_ *target(const GSAIAgentLocation &val) {
|
void GSAIArrive::set_target(const Ref<GSAIAgentLocation> &val) {
|
||||||
*target = val;
|
target = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
float GSAIArrive::get_arrival_tolerance() const {
|
float GSAIArrive::get_arrival_tolerance() const {
|
||||||
@ -33,52 +37,39 @@ void GSAIArrive::set_time_to_reach(const float val) {
|
|||||||
time_to_reach = val;
|
time_to_reach = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Calculates acceleration to take an agent to its target's location. The;
|
void GSAIArrive::arrive(const Ref<GSAITargetAcceleration> &acceleration, const Vector3 &target_position) {
|
||||||
// calculation attempts to arrive with zero remaining velocity.;
|
|
||||||
// @category - Individual behaviors;
|
|
||||||
// Target agent to arrive to.;
|
|
||||||
GSAIAgentLocation *target;
|
|
||||||
// Distance from the target for the agent to be considered successfully;
|
|
||||||
// arrived.;
|
|
||||||
float arrival_tolerance = 0.0;
|
|
||||||
// Distance from the target for the agent to begin slowing down.;
|
|
||||||
float deceleration_radius = 0.0;
|
|
||||||
// Represents the time it takes to change acceleration.;
|
|
||||||
float time_to_reach = 0.1;
|
|
||||||
|
|
||||||
void GSAIArrive::arrive(const GSAITargetAcceleration &acceleration, const Vector3 &target_position) {
|
|
||||||
call("_arrive", acceleration, target_position);
|
call("_arrive", acceleration, target_position);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSAIArrive::_arrive(const GSAITargetAcceleration &acceleration, const Vector3 &target_position) {
|
void GSAIArrive::_arrive(Ref<GSAITargetAcceleration> acceleration, Vector3 target_position) {
|
||||||
Vector3 to_target = target_position - agent.position;
|
ERR_FAIL_COND(!agent.is_valid());
|
||||||
|
|
||||||
|
Vector3 to_target = target_position - agent->get_position();
|
||||||
float distance = to_target.length();
|
float distance = to_target.length();
|
||||||
|
|
||||||
if (distance <= arrival_tolerance) {
|
if (distance <= arrival_tolerance) {
|
||||||
acceleration.set_zero();
|
acceleration->set_zero();
|
||||||
}
|
} else {
|
||||||
|
float desired_speed = agent->get_linear_speed_max();
|
||||||
else {
|
|
||||||
float desired_speed = agent.linear_speed_max;
|
|
||||||
|
|
||||||
if (distance <= deceleration_radius) {
|
if (distance <= deceleration_radius) {
|
||||||
desired_speed *= distance / deceleration_radius;
|
desired_speed *= distance / deceleration_radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector3 desired_velocity = to_target * desired_speed / distance;
|
Vector3 desired_velocity = to_target * desired_speed / distance;
|
||||||
desired_velocity = ((desired_velocity - agent.linear_velocity) * 1.0 / time_to_reach);
|
desired_velocity = ((desired_velocity - agent->get_linear_velocity()) * 1.0 / time_to_reach);
|
||||||
acceleration.linear = GSAIUtils.clampedv3(desired_velocity, agent.linear_acceleration_max);
|
acceleration->set_linear(GSAIUtils::clampedv3(desired_velocity, agent->get_linear_acceleration_max()));
|
||||||
acceleration.angular = 0;
|
acceleration->set_angular(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSAIArrive::_calculate_steering(const GSAITargetAcceleration &acceleration) {
|
void GSAIArrive::_calculate_steering(Ref<GSAITargetAcceleration> acceleration) {
|
||||||
arrive(acceleration, target.position);
|
ERR_FAIL_COND(!target.is_valid());
|
||||||
}
|
|
||||||
|
arrive(acceleration, target->get_position());
|
||||||
}
|
}
|
||||||
|
|
||||||
GSAIArrive::GSAIArrive() {
|
GSAIArrive::GSAIArrive() {
|
||||||
*target;
|
|
||||||
arrival_tolerance = 0.0;
|
arrival_tolerance = 0.0;
|
||||||
deceleration_radius = 0.0;
|
deceleration_radius = 0.0;
|
||||||
time_to_reach = 0.1;
|
time_to_reach = 0.1;
|
||||||
@ -87,10 +78,10 @@ GSAIArrive::GSAIArrive() {
|
|||||||
GSAIArrive::~GSAIArrive() {
|
GSAIArrive::~GSAIArrive() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GSAIArrive::_bind_methods() {
|
void GSAIArrive::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("get_*target"), &GSAIArrive::get_ * target);
|
ClassDB::bind_method(D_METHOD("get_target"), &GSAIArrive::get_target);
|
||||||
ClassDB::bind_method(D_METHOD("set_*target", "value"), &GSAIArrive::set_ * target);
|
ClassDB::bind_method(D_METHOD("set_target", "value"), &GSAIArrive::set_target);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "*target", PROPERTY_HINT_RESOURCE_TYPE, "GSAIAgentLocation"), "set_*target", "get_*target");
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "target", PROPERTY_HINT_RESOURCE_TYPE, "GSAIAgentLocation"), "set_target", "get_target");
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_arrival_tolerance"), &GSAIArrive::get_arrival_tolerance);
|
ClassDB::bind_method(D_METHOD("get_arrival_tolerance"), &GSAIArrive::get_arrival_tolerance);
|
||||||
ClassDB::bind_method(D_METHOD("set_arrival_tolerance", "value"), &GSAIArrive::set_arrival_tolerance);
|
ClassDB::bind_method(D_METHOD("set_arrival_tolerance", "value"), &GSAIArrive::set_arrival_tolerance);
|
||||||
@ -104,7 +95,7 @@ static void GSAIArrive::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("set_time_to_reach", "value"), &GSAIArrive::set_time_to_reach);
|
ClassDB::bind_method(D_METHOD("set_time_to_reach", "value"), &GSAIArrive::set_time_to_reach);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_to_reach"), "set_time_to_reach", "get_time_to_reach");
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "time_to_reach"), "set_time_to_reach", "get_time_to_reach");
|
||||||
|
|
||||||
|
BIND_VMETHOD(MethodInfo("_arrive", PropertyInfo(Variant::OBJECT, "acceleration", PROPERTY_HINT_RESOURCE_TYPE, "GSAITargetAcceleration"), PropertyInfo(Variant::VECTOR3, "target_position")));
|
||||||
ClassDB::bind_method(D_METHOD("arrive", "acceleration", "target_position"), &GSAIArrive::arrive);
|
ClassDB::bind_method(D_METHOD("arrive", "acceleration", "target_position"), &GSAIArrive::arrive);
|
||||||
ClassDB::bind_method(D_METHOD("_arrive", "acceleration", "target_position"), &GSAIArrive::_arrive);
|
ClassDB::bind_method(D_METHOD("_arrive", "acceleration", "target_position"), &GSAIArrive::_arrive);
|
||||||
ClassDB::bind_method(D_METHOD("_calculate_steering", "acceleration"), &GSAIArrive::_calculate_steering);
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
#ifndef GSAI_ARRIVE_H
|
#ifndef GSAI_ARRIVE_H
|
||||||
#define GSAI_ARRIVE_H
|
#define GSAI_ARRIVE_H
|
||||||
|
|
||||||
|
#include "core/object/reference.h"
|
||||||
|
|
||||||
|
#include "../gsai_steering_behavior.h"
|
||||||
|
|
||||||
|
class GSAIAgentLocation;
|
||||||
|
|
||||||
class GSAIArrive : public GSAISteeringBehavior {
|
class GSAIArrive : public GSAISteeringBehavior {
|
||||||
GDCLASS(GSAIArrive, GSAISteeringBehavior);
|
GDCLASS(GSAIArrive, GSAISteeringBehavior);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GSAIAgentLocation get_ *target();
|
Ref<GSAIAgentLocation> get_target();
|
||||||
void set_ *target(const GSAIAgentLocation &val);
|
void set_target(const Ref<GSAIAgentLocation> &val);
|
||||||
|
|
||||||
float get_arrival_tolerance() const;
|
float get_arrival_tolerance() const;
|
||||||
void set_arrival_tolerance(const float val);
|
void set_arrival_tolerance(const float val);
|
||||||
@ -17,10 +23,10 @@ public:
|
|||||||
float get_time_to_reach() const;
|
float get_time_to_reach() const;
|
||||||
void set_time_to_reach(const float val);
|
void set_time_to_reach(const float val);
|
||||||
|
|
||||||
void arrive(const GSAITargetAcceleration &acceleration, const Vector3 &target_position);
|
void arrive(const Ref<GSAITargetAcceleration> &acceleration, const Vector3 &target_position);
|
||||||
void _arrive(const GSAITargetAcceleration &acceleration, const Vector3 &target_position);
|
virtual void _arrive(Ref<GSAITargetAcceleration> acceleration, Vector3 target_position);
|
||||||
|
|
||||||
void _calculate_steering(const GSAITargetAcceleration &acceleration);
|
void _calculate_steering(Ref<GSAITargetAcceleration> acceleration);
|
||||||
|
|
||||||
GSAIArrive();
|
GSAIArrive();
|
||||||
~GSAIArrive();
|
~GSAIArrive();
|
||||||
@ -32,14 +38,14 @@ protected:
|
|||||||
// calculation attempts to arrive with zero remaining velocity.
|
// calculation attempts to arrive with zero remaining velocity.
|
||||||
// @category - Individual behaviors
|
// @category - Individual behaviors
|
||||||
// Target agent to arrive to.
|
// Target agent to arrive to.
|
||||||
GSAIAgentLocation *target;
|
Ref<GSAIAgentLocation> target;
|
||||||
// Distance from the target for the agent to be considered successfully
|
// Distance from the target for the agent to be considered successfully
|
||||||
// arrived.
|
// arrived.
|
||||||
float arrival_tolerance = 0.0;
|
float arrival_tolerance;
|
||||||
// Distance from the target for the agent to begin slowing down.
|
// Distance from the target for the agent to begin slowing down.
|
||||||
float deceleration_radius = 0.0;
|
float deceleration_radius;
|
||||||
// Represents the time it takes to change acceleration.
|
// Represents the time it takes to change acceleration.
|
||||||
float time_to_reach = 0.1;
|
float time_to_reach;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,7 +12,7 @@ class GSAIFace : public GSAIMatchOrientation {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
void face(const Ref<GSAITargetAcceleration> &acceleration, const Vector3 &target_position);
|
void face(const Ref<GSAITargetAcceleration> &acceleration, const Vector3 &target_position);
|
||||||
void _face(Ref<GSAITargetAcceleration> acceleration, Vector3 target_position);
|
virtual void _face(Ref<GSAITargetAcceleration> acceleration, Vector3 target_position);
|
||||||
|
|
||||||
void _calculate_steering(Ref<GSAITargetAcceleration> acceleration);
|
void _calculate_steering(Ref<GSAITargetAcceleration> acceleration);
|
||||||
|
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
|
|
||||||
#include "gsai_follow_path.h"
|
#include "gsai_follow_path.h"
|
||||||
|
|
||||||
GSAIPath GSAIFollowPath::get_ *path() {
|
#include "../gsai_path.h"
|
||||||
return *path;
|
#include "../gsai_steering_agent.h"
|
||||||
|
#include "../gsai_target_acceleration.h"
|
||||||
|
|
||||||
|
Ref<GSAIPath> GSAIFollowPath::get_path() {
|
||||||
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GSAIFollowPath::set_ *path(const GSAIPath &val) {
|
void GSAIFollowPath::set_path(const Ref<GSAIPath> &val) {
|
||||||
*path = val;
|
path = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
float GSAIFollowPath::get_path_offset() const {
|
float GSAIFollowPath::get_path_offset() const {
|
||||||
@ -33,50 +37,36 @@ void GSAIFollowPath::set_prediction_time(const float val) {
|
|||||||
prediction_time = val;
|
prediction_time = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Produces a linear acceleration that moves the agent along the specified path.;
|
void GSAIFollowPath::_calculate_steering(Ref<GSAITargetAcceleration> acceleration) {
|
||||||
// @category - Individual behaviors;
|
ERR_FAIL_COND(!agent.is_valid());
|
||||||
// The path to follow and travel along.;
|
ERR_FAIL_COND(!path.is_valid());
|
||||||
GSAIPath *path;
|
|
||||||
// The distance along the path to generate the next target position.;
|
|
||||||
float path_offset = 0.0;
|
|
||||||
// Whether to use `GSAIArrive` behavior on an open path.;
|
|
||||||
bool is_arrive_enabled = true;
|
|
||||||
// The amount of time in the future to predict the owning agent's position along;
|
|
||||||
// the path. Setting it to 0.0 will force non-predictive path following.;
|
|
||||||
float prediction_time = 0.0;
|
|
||||||
|
|
||||||
void GSAIFollowPath::_calculate_steering(const GSAITargetAcceleration &acceleration) {
|
Vector3 location;
|
||||||
Vector3 location = ;
|
|
||||||
|
|
||||||
if (prediction_time == 0) {
|
if (prediction_time == 0) {
|
||||||
location = agent.position;
|
location = agent->get_position();
|
||||||
|
} else {
|
||||||
|
location = agent->get_position() + (agent->get_linear_velocity() * prediction_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
float distance = path->calculate_distance(location);
|
||||||
location = agent.position + (agent.linear_velocity * prediction_time);
|
|
||||||
}
|
|
||||||
|
|
||||||
float distance = path.calculate_distance(location);
|
|
||||||
float target_distance = distance + path_offset;
|
float target_distance = distance + path_offset;
|
||||||
|
|
||||||
if (prediction_time > 0 && path.is_open) {
|
if (prediction_time > 0 && path->get_is_open()) {
|
||||||
if (target_distance < path.calculate_distance(agent.position)) {
|
if (target_distance < path->calculate_distance(agent->get_position())) {
|
||||||
target_distance = path.length;
|
target_distance = path->get_length();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector3 target_position = path.calculate_target_position(target_distance);
|
Vector3 target_position = path->calculate_target_position(target_distance);
|
||||||
|
|
||||||
if (is_arrive_enabled && path.is_open) {
|
if (is_arrive_enabled && path->get_is_open()) {
|
||||||
if (path_offset >= 0) {
|
if (path_offset >= 0) {
|
||||||
if (target_distance > path.length - deceleration_radius) {
|
if (target_distance > path->get_length() - deceleration_radius) {
|
||||||
arrive(acceleration, target_position);
|
arrive(acceleration, target_position);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
else {
|
|
||||||
if (target_distance < deceleration_radius) {
|
if (target_distance < deceleration_radius) {
|
||||||
arrive(acceleration, target_position);
|
arrive(acceleration, target_position);
|
||||||
return;
|
return;
|
||||||
@ -84,14 +74,14 @@ void GSAIFollowPath::_calculate_steering(const GSAITargetAcceleration &accelerat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
acceleration.linear = (target_position - agent.position).normalized();
|
Vector3 linear = (target_position - agent->get_position()).normalized();
|
||||||
acceleration.linear *= agent.linear_acceleration_max;
|
linear *= agent->get_linear_acceleration_max();
|
||||||
acceleration.angular = 0;
|
|
||||||
}
|
acceleration->set_linear(linear);
|
||||||
|
acceleration->set_angular(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
GSAIFollowPath::GSAIFollowPath() {
|
GSAIFollowPath::GSAIFollowPath() {
|
||||||
*path;
|
|
||||||
path_offset = 0.0;
|
path_offset = 0.0;
|
||||||
is_arrive_enabled = true;
|
is_arrive_enabled = true;
|
||||||
prediction_time = 0.0;
|
prediction_time = 0.0;
|
||||||
@ -100,10 +90,10 @@ GSAIFollowPath::GSAIFollowPath() {
|
|||||||
GSAIFollowPath::~GSAIFollowPath() {
|
GSAIFollowPath::~GSAIFollowPath() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GSAIFollowPath::_bind_methods() {
|
void GSAIFollowPath::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("get_*path"), &GSAIFollowPath::get_ * path);
|
ClassDB::bind_method(D_METHOD("get_path"), &GSAIFollowPath::get_path);
|
||||||
ClassDB::bind_method(D_METHOD("set_*path", "value"), &GSAIFollowPath::set_ * path);
|
ClassDB::bind_method(D_METHOD("set_path", "value"), &GSAIFollowPath::set_path);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "*path", PROPERTY_HINT_RESOURCE_TYPE, "GSAIPath"), "set_*path", "get_*path");
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "path", PROPERTY_HINT_RESOURCE_TYPE, "GSAIPath"), "set_path", "get_path");
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_path_offset"), &GSAIFollowPath::get_path_offset);
|
ClassDB::bind_method(D_METHOD("get_path_offset"), &GSAIFollowPath::get_path_offset);
|
||||||
ClassDB::bind_method(D_METHOD("set_path_offset", "value"), &GSAIFollowPath::set_path_offset);
|
ClassDB::bind_method(D_METHOD("set_path_offset", "value"), &GSAIFollowPath::set_path_offset);
|
||||||
@ -116,6 +106,4 @@ static void GSAIFollowPath::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("get_prediction_time"), &GSAIFollowPath::get_prediction_time);
|
ClassDB::bind_method(D_METHOD("get_prediction_time"), &GSAIFollowPath::get_prediction_time);
|
||||||
ClassDB::bind_method(D_METHOD("set_prediction_time", "value"), &GSAIFollowPath::set_prediction_time);
|
ClassDB::bind_method(D_METHOD("set_prediction_time", "value"), &GSAIFollowPath::set_prediction_time);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::REAL, "prediction_time"), "set_prediction_time", "get_prediction_time");
|
ADD_PROPERTY(PropertyInfo(Variant::REAL, "prediction_time"), "set_prediction_time", "get_prediction_time");
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("_calculate_steering", "acceleration"), &GSAIFollowPath::_calculate_steering);
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
#ifndef GSAI_FOLLOW_PATH_H
|
#ifndef GSAI_FOLLOW_PATH_H
|
||||||
#define GSAI_FOLLOW_PATH_H
|
#define GSAI_FOLLOW_PATH_H
|
||||||
|
|
||||||
|
#include "core/object/reference.h"
|
||||||
|
|
||||||
|
#include "gsai_arrive.h"
|
||||||
|
|
||||||
|
class GSAIPath;
|
||||||
|
|
||||||
class GSAIFollowPath : public GSAIArrive {
|
class GSAIFollowPath : public GSAIArrive {
|
||||||
GDCLASS(GSAIFollowPath, GSAIArrive);
|
GDCLASS(GSAIFollowPath, GSAIArrive);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GSAIPath get_path();
|
Ref<GSAIPath> get_path();
|
||||||
void set_path(const GSAIPath &val);
|
void set_path(const Ref<GSAIPath> &val);
|
||||||
|
|
||||||
float get_path_offset() const;
|
float get_path_offset() const;
|
||||||
void set_path_offset(const float val);
|
void set_path_offset(const float val);
|
||||||
@ -17,7 +23,7 @@ public:
|
|||||||
float get_prediction_time() const;
|
float get_prediction_time() const;
|
||||||
void set_prediction_time(const float val);
|
void set_prediction_time(const float val);
|
||||||
|
|
||||||
void _calculate_steering(const GSAITargetAcceleration &acceleration);
|
void _calculate_steering(Ref<GSAITargetAcceleration> acceleration);
|
||||||
|
|
||||||
GSAIFollowPath();
|
GSAIFollowPath();
|
||||||
~GSAIFollowPath();
|
~GSAIFollowPath();
|
||||||
@ -28,14 +34,14 @@ protected:
|
|||||||
// Produces a linear acceleration that moves the agent along the specified path.
|
// Produces a linear acceleration that moves the agent along the specified path.
|
||||||
// @category - Individual behaviors
|
// @category - Individual behaviors
|
||||||
// The path to follow and travel along.
|
// The path to follow and travel along.
|
||||||
GSAIPath *path;
|
Ref<GSAIPath> path;
|
||||||
// The distance along the path to generate the next target position.
|
// The distance along the path to generate the next target position.
|
||||||
float path_offset = 0.0;
|
float path_offset;
|
||||||
// Whether to use `GSAIArrive` behavior on an open path.
|
// Whether to use `GSAIArrive` behavior on an open path.
|
||||||
bool is_arrive_enabled = true;
|
bool is_arrive_enabled;
|
||||||
// The amount of time in the future to predict the owning agent's position along
|
// The amount of time in the future to predict the owning agent's position along
|
||||||
// the path. Setting it to 0.0 will force non-predictive path following.
|
// the path. Setting it to 0.0 will force non-predictive path following.
|
||||||
float prediction_time = 0.0;
|
float prediction_time;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -28,7 +28,7 @@ public:
|
|||||||
void set_use_z(const bool val);
|
void set_use_z(const bool val);
|
||||||
|
|
||||||
void match_orientation(const Ref<GSAITargetAcceleration> &acceleration, const float desired_orientation);
|
void match_orientation(const Ref<GSAITargetAcceleration> &acceleration, const float desired_orientation);
|
||||||
void _match_orientation(Ref<GSAITargetAcceleration> acceleration, float desired_orientation);
|
virtual void _match_orientation(Ref<GSAITargetAcceleration> acceleration, float desired_orientation);
|
||||||
|
|
||||||
void _calculate_steering(Ref<GSAITargetAcceleration> acceleration);
|
void _calculate_steering(Ref<GSAITargetAcceleration> acceleration);
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ public:
|
|||||||
void set_predict_time_max(const float val);
|
void set_predict_time_max(const float val);
|
||||||
|
|
||||||
void _calculate_steering(Ref<GSAITargetAcceleration> acceleration);
|
void _calculate_steering(Ref<GSAITargetAcceleration> acceleration);
|
||||||
|
|
||||||
float get_modified_acceleration();
|
float get_modified_acceleration();
|
||||||
virtual float _get_modified_acceleration();
|
virtual float _get_modified_acceleration();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user