2023-01-13 21:13:57 +01:00
|
|
|
#ifndef GSAIFACE_H
|
|
|
|
#define GSAIFACE_H
|
|
|
|
|
|
|
|
class GSAIFace : public GSAIMatchOrientation {
|
2023-01-13 21:35:07 +01:00
|
|
|
GDCLASS(GSAIFace, GSAIMatchOrientation);
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
public:
|
|
|
|
void face(const GSAITargetAcceleration &acceleration, const Vector3 &target_position);
|
|
|
|
void _face(const GSAITargetAcceleration &acceleration, const Vector3 &target_position);
|
|
|
|
void _calculate_steering(const GSAITargetAcceleration &acceleration);
|
2023-01-13 21:13:57 +01:00
|
|
|
|
2023-01-13 21:35:07 +01:00
|
|
|
GSAIFace();
|
|
|
|
~GSAIFace();
|
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 angular acceleration to rotate a target to face its target's
|
|
|
|
// position. The behavior attemps to arrive with zero remaining angular velocity.
|
|
|
|
// @category - Individual behaviors
|
2023-01-13 21:13:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|