A unit disappears behind a tall building and the player cannot give orders
In a slanted view the buildings in front of a unit hide it. Fading every tall building looks messy, and fading none loses the unit. Here is how to find exactly the buildings that cover a unit, how tall they must be to do so, and how to fade them in and out without flicker.
Why this works
The player must always see what they are about to command. Fading only what really covers the chosen figure keeps the picture solid everywhere else, and a gradual change is read as a gentle hint instead of a flicker.
When not to use it
It hurts when walls must stay opaque for the story or for fairness, such as hiding places in a stealth game. There, show an outline or marker of the unit through the wall rather than making the wall vanish.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 34 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 "A unit disappears behind a tall building and the player cannot give orders" (read_entry strategy-fade-buildings-over-selected-unit) 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