Make a homing spell curve toward its target without orbiting it forever
A spell that can only turn so fast looks natural as it bends toward an enemy, but if the enemy is too close or off to the side it circles forever and never hits. Here is how to turn the short way, notice the doomed case, and end it cleanly.
Why this works
A thing that moves at a steady pace can only bend so sharply, like a bike taking a corner. Letting it turn a little each moment, always the short way round, gives a believable curve, and the tightest bend tells you which targets it can never reach.
When not to use it
Skip it when the spell must always hit, such as a story power or a weak early weapon. Then pull it straight to the target in a set time, since a spell that circles forever frustrates players who did nothing wrong.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 25 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Make a homing spell curve toward its target without orbiting it forever" (read_entry homing-spell-turns-at-a-limited-rate) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP