Weather: in wind, anything over an avatar's joint counts as cover (the shelter test's first step ignores the rain's slant) #1162

Open
opened 2026-10-27 18:38:52 +00:00 by TheSlowly · 0 comments
Collaborator

Found with the per-joint shelter log while testing #1130.

In clean_weather_shelter.comp (PREP, body exposure), each joint walks 5 points up the rain path (kWxDz). Step 0 is the joint itself (dz 0), and its test is top >= Q.z - 0.02 && top > head.z + kWxCoverAbove. That is true for any own surface anywhere above the joint in the vertical column, whatever the rain's slant. With an umbrella overhead in strong wind (rain shear 1.22, snow at about 50 degrees), all 7 joints hit at step 0 with the canopy 0.67-0.94 m above the head. The body reads fully covered even though slanted snow can reach it under the canopy.

With no wind this gives the right answer, so it only matters in wind.

Proposed: a step counts as cover only where the surface crosses the path near that step's height (an upper bound such as top <= Q.z + step spacing), not anywhere above it.

Test: an umbrella overhead in strong wind. Joints on the windward side should read exposed, while with no wind everything under the canopy stays covered.

Found with the per-joint shelter log while testing #1130. In `clean_weather_shelter.comp` (PREP, body exposure), each joint walks 5 points up the rain path (`kWxDz`). Step 0 is the joint itself (dz 0), and its test is `top >= Q.z - 0.02 && top > head.z + kWxCoverAbove`. That is true for **any** own surface anywhere above the joint in the vertical column, whatever the rain's slant. With an umbrella overhead in strong wind (rain shear 1.22, snow at about 50 degrees), all 7 joints hit at step 0 with the canopy 0.67-0.94 m above the head. The body reads fully covered even though slanted snow can reach it under the canopy. With no wind this gives the right answer, so it only matters in wind. **Proposed:** a step counts as cover only where the surface crosses the path near that step's height (an upper bound such as `top <= Q.z + step spacing`), not anywhere above it. **Test:** an umbrella overhead in strong wind. Joints on the windward side should read exposed, while with no wind everything under the canopy stays covered.
TheSlowly added this to the Slipstream project 2026-10-27 18:38:52 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#1162
No description provided.