The triangle-aware Z sampling from the previous commit produces exact terrain-surface Z values, but a point-sampled Z on a tilted surface places the character's center on the surface while their feet (which extend horizontally) clip into the rising terrain ahead/behind. Fix: in PlayerMovementController, sample Z 1 unit ahead in the walk direction and add 40% of the gradient as an upward bias. This compensates for the character's collision cylinder radius on slopes while producing zero bias on flat ground. The bias is applied in the movement controller (gameplay concern) not in TerrainSurface.SampleZ (which stays exact for physics/tests). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Input | ||
| Plugins | ||
| Rendering | ||
| Streaming | ||
| AcDream.App.csproj | ||
| Program.cs | ||