diff options
| author | Valentin Popov <valentin@popov.link> | 2026-11-26 19:20:38 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-11-26 19:20:38 +0300 |
| commit | f3d1b4d2aff8e47003626129641c36e44c7fb040 (patch) | |
| tree | b9b6ca525c7d88489b6a519a4c4f8387d84abe1d /apps | |
| parent | 2e0a4571af587f28ba5ea580f177a225d0d352e2 (diff) | |
| download | fparkan-f3d1b4d2aff8e47003626129641c36e44c7fb040.tar.xz fparkan-f3d1b4d2aff8e47003626129641c36e44c7fb040.zip | |
fix(movement): limit hero ascent using the Control slope profile
Use the normal of the same triangle that supplies terrain support, apply
the walking profile's speed envelope, and resolve support again for the
shortened step. The existing immediate-speed model still omits native
braking inertia.
The native Control call confirms the envelope and the downhill bypass.
In the stock Firing Line window the hero stopped at the west slope and
could walk back. The bridge and factory walkway corpus checks passed.
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/fparkan-game/src/player_collision.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/fparkan-game/src/player_collision.rs b/apps/fparkan-game/src/player_collision.rs index c403f958..802e3bef 100644 --- a/apps/fparkan-game/src/player_collision.rs +++ b/apps/fparkan-game/src/player_collision.rs @@ -10,10 +10,10 @@ impl StaticVulkanApp { let [start, end] = step.sweep.expect("walking floor probe"); let support = |[x, y, _]: [f32; 3]| { self.terrain - .support_at([x, y]) + .support_plane_at([x, y]) .map_err(|err| err.to_string()) }; - let previous = support(start)?.map(|(height, _)| height); + let previous = support(start)?.map(|plane| plane.height); let next = support(end)?; step = step.with_scene_terrain(previous, next); previous.is_none() || next.is_none() |
