Find the throwing angle that lands a grenade exactly on the target
A thrown grenade falls short, flies over, or lands in front of the enemy on a ledge. Here is how to calculate the angle for a given throwing speed, why there are usually two good answers, and how a low ceiling decides between them.
Why this works
For a given throwing speed, the path is set by the angle, and the same landing spot can be reached by a flat, quick throw or a high, slow one. Solving for the angle directly tells you if the target is in reach, and a low ceiling decides which throw fits.
When not to use it
Skip it when the grenade bounces, rolls, is slowed by air or when the target moves quickly, since the simple arc no longer matches what happens. Then try a throw, watch where it lands and correct it, or let the target come to the grenade.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 20 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 "Find the throwing angle that lands a grenade exactly on the target" (read_entry lob-a-grenade-onto-a-target) 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