The 17 Rays: How Valheim Decides Whether You Are Sheltered

Valheim decides whether something is sheltered by firing 17 invisible rays and counting how many are blocked. One goes straight up, eight go horizontally, and eight go diagonally — and they always point the same way regardless of how your building is rotated. That single implementation detail explains the game's most frustrating building bug: the same house, built facing a different direction, can have different cover. Here is how the system works and what each structure needs.
On sourcing. Iron Gate do not publish this. The details below come from the community Valheim wiki, and can change with any patch.
How Cover Is Measured
Seventeen rays from the structure's cover point:
| Direction | Count |
|---|---|
| Straight up | 1 |
| Horizontal, cardinal | 8 |
| 45° between horizontal and vertical | 8 |
Each ray starts 0.5 metres from the cover point and runs to 29.5 metres — a 30-metre reach. The proportion blocked is your cover percentage.
A roof is checked separately, by looking for a non-leaky material directly above within 100 metres. So "roof" and "cover" are two different tests, and a structure can pass one and fail the other.
The implementation has documented quirks, and they are worth knowing because each one looks like a bug:
- Very close to a wall or roof, rays can start outside it — ignoring the very thing that should be covering you.
- Rotation changes the result. "Same building with a different orientation may have a different cover because cover lines always have the same orientation."
- Very large open interiors can end up with no cover at all — the rays escape sideways before hitting anything.
- Terrain, trees and rocks can grant unexpected cover, which is why a workbench under a cliff sometimes works outdoors.
What Each Structure Needs

| Structure | Requirement |
|---|---|
| Workbench, Forge, Stonecutter, Artisan table | 70% cover and a roof — for crafting and repairing |
| Bed, Dragon bed | 80% cover and a roof — for setting spawn and sleeping |
| Beehive | Less than 60% cover — to produce honey |
The beehive is the inversion that catches everyone. Every other structure wants to be enclosed; the beehive needs to be open. Putting your apiary inside the nice stone hall is exactly why it stops producing.
The 10-point gap between crafting and sleeping is deliberate and awkward. A shed at 75% cover will let you repair gear but not let you sleep or set a spawn point — a genuinely common mid-game confusion when a hastily built outpost half-works.
And "a roof" means a non-leaky material. Thatch and shingle roofs qualify; open framework does not, no matter how much it blocks the vertical ray.
Building for Cover

The rules follow directly from how the rays behave:
- Build the working room small. Large open interiors let the eight horizontal rays escape — a hall can fail where a shed passes.
- Put benches near a corner rather than the middle. More rays hit walls sooner.
- If a bed will not work in a room where the workbench does, you are between 70% and 80% — add walls, not roof.
- Keep the beehive outside, or under something that covers less than 60%.
- If cover behaves strangely, try rotating the building. It is not superstition — orientation genuinely changes the result.
Cover also decides comfort and shelter status, which chains into the Rested effect and therefore into stamina regeneration. A room that fails cover is not just a crafting problem; it is a stamina problem.
On a shared server, cover failures are usually additive mistakes. Someone opens a doorway or removes a wall for access, and three benches downstream stop working. If crafting suddenly fails in an old base, look for a recently removed wall rather than a bug.
Cover, Smoke and the Sealed-Room Trap

There is a direct conflict built into the game, and it is the single most common base-building failure.
Cover wants your room sealed. Smoke needs to escape.
Smoke-producing structures stop working if they cannot vent for four seconds — that includes the campfire, hearth, bonfire, smelter, blast furnace, charcoal kiln, hanging brazier and hot tub. And a fire nearby is one of the five conditions for sleeping.
So the sequence that traps people is: seal the room to reach 80% cover for the bed → the fire cannot vent → the fire stops → now you cannot sleep because there is no working fire.
The resolution is a smoke gap that is not a cover gap. Smoke instances have a radius of 0.42 metres and need roughly 1 metre of clearance to pass — so a small vent high in a wall or a single missing roof tile above the fire lets smoke out while blocking few rays.
The wiki notes a cleaner trick: beams block smoke without blocking access. The reverse also holds — a gap placed high, directly above the fire, costs you at most one or two of the 17 rays, since only the vertical and upper diagonals pass through it.
Practical tips
- Cover is 17 rays: 1 up, 8 horizontal, 8 diagonal, each reaching 30 metres.
- Rays ignore your building's rotation — turning a structure can change its cover.
- Workbench, Forge, Stonecutter, Artisan table: 70% and a roof.
- Beds: 80% and a roof. The 10-point gap is why a shed half-works.
- Beehives need LESS than 60% — keep them outside.
- Large open interiors often fail because the horizontal rays escape.
- Smoke needs ~1 m of clearance and 4 seconds to vent or the fire stops.
- Vent high, above the fire — it costs the fewest cover rays.
Running your own Valheim server
Cover, smoke and comfort are properties of a building that several people extend over many sessions — and one removed wall can stop three benches working. A gamever Valheim server keeps the base and a one-click backup of it available around the clock for up to 10 players, and updates automatically so client and server versions never drift apart.
Conclusion
Valheim measures shelter by firing 17 rays — one up, eight horizontal, eight at 45 degrees — from a structure's cover point out to 30 metres, and counting how many are blocked. Because the rays always keep the same orientation regardless of how the building is rotated, the same house can have different cover facing a different way. Workbenches, Forges, Stonecutters and Artisan tables need 70% cover and a roof; beds need 80%; and beehives need less than 60% — the one structure that wants to be open. Large open interiors frequently fail because the horizontal rays escape, so small rooms and corner placements beat great halls. And the trap to plan around is the conflict with smoke: sealing a room to reach 80% can stop the fire venting, and a fire that cannot vent for four seconds shuts down — taking one of the five sleeping requirements with it. Vent high and directly above the fire, where it costs the fewest rays.
Want a backup before you knock that wall through? Rent a Valheim server at gamever.io — instant setup, one-click backups and updates, and 24/7 uptime. Start with a free trial and use promo code WELCOME.
