mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-11-23 01:19:20 +01:00
27 lines
660 B
C++
27 lines
660 B
C++
#ifndef GSAICOHESION_H
|
|
#define GSAICOHESION_H
|
|
|
|
class GSAICohesion : public GSAIGroupBehavior {
|
|
GDCLASS(GSAICohesion, GSAIGroupBehavior);
|
|
|
|
public:
|
|
Vector3 get__center_of_mass();
|
|
void set__center_of_mass(const Vector3 &val);
|
|
|
|
void _calculate_steering(const GSAITargetAcceleration &acceleration);
|
|
bool _report_neighbor(const GSAISteeringAgent &neighbor);
|
|
|
|
GSAICohesion();
|
|
~GSAICohesion();
|
|
|
|
protected:
|
|
static void _bind_methods();
|
|
|
|
// Calculates an acceleration that attempts to move the agent towards the center
|
|
// of mass of the agents in the area defined by the `GSAIProximity`.
|
|
// @category - Group behaviors
|
|
Vector3 _center_of_mass = ;
|
|
};
|
|
|
|
#endif
|