0
\$\begingroup\$

I'm looking for a way to implement a fighter-jet like movement behavior for my non-player entities in my 2D side-view shoot-em-up.

I.e. enemy entities (say jets or planes) can't suddenly change their facing or velocity vector, but instead should need to slow down and / or fly a curve in a wider angle, possibly depending on a properties like "agility" or "maneuverability".

Gravity is not relevant for Enemy entities.

The goal would be to have an enemy Entity that can ultimately "intercept" the players path to fire a projectile. However, just being able to move in a smooth way would already be a great help.

To be specific, assume the player is at position (200, 0), with its movement vector being normalized (-1, 0) (i.e. moving to the left). The enemy would be at position (400, 100), moving normalized at (1, 0) (to the right).

I'm at a complete loss on how I could implement such a steering behavior.

If it matters, I'm using Godot, so I have the built-in _process with a delta time variable.

\$\endgroup\$
3
  • 2
    \$\begingroup\$ You may be interested in this previous Q&A about maneuvering pirate ships to intercept the player. I show an example of how you can plot such an intercept course as cubic Bézier curve with a limited maximum acceleration. \$\endgroup\$ Commented Oct 11, 2022 at 12:32
  • \$\begingroup\$ @user253751 In the example above, i would want the jet to turn around and fly a curve either up or down, essentially then homing in on the player. The wideness of the curve would depend on the $agility of the player entity or something akin.Does that make sense ? \$\endgroup\$ Commented Oct 11, 2022 at 13:40
  • \$\begingroup\$ Perhaps this one helps you: How do I calculate paths for objects with limited acceleration? \$\endgroup\$ Commented Oct 11, 2022 at 21:21

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.