Smooth the pawn's vertical step between terraces #92
Labels
No labels
assets
bug
duplicate
enhancement
help wanted
invalid
question
testing
ui
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
liamjd/UntitledColonyBuilder#92
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up from #80, which is merged and correct as specified — this is presentation polish on top of it, not a bug fix.
PawnView._move_to_ground()resamples Y frommap.height_at()every frame and assigns it directly. That is the right ground truth: the pawn stands on the terrace it is actually on, never inside a riser and never floating over one. But the transition is instantaneous — the pawn's Y jumps a fulllevel_heightin the single frame its XZ crosses the tile boundary.Evidence
tools/probe_pawn_terrace.gdwalks a pawn over a staircase (up three terraces, down two) and drops a marker every 0.2s. At 1.5 tiles/s the pawn covers 0.6 world units between samples, and a riser is 0.5 units tall — yet there is no intermediate sample on any riser. Every sampled Y is exactlysurface_y(level) + pawn_height / 2:The trail image is a clean staircase of dots. That is the correct shape; the issue is that in motion it reads as a teleport rather than a step up.
Secondary, and probably not worth solving separately: at the boundary frame the capsule's lower half briefly intersects the riser corner, because the pawn is a 0.25-radius capsule being positioned by a point sample.
Why this is not just "interpolate Y"
The obvious fix — ease Y toward the sampled surface over a few frames — would break
test_height_steps_with_the_terrain_instead_of_ramping_between_waypointsintest/unit/test_pawn_view.gd, which asserts the snap deliberately. That test is right about the model: the pawn is on one terrace or the other, never halfway up a cliff face. So the smoothing belongs in a presentation layer that lags the authoritative Y, not in the model.That distinction matters for anything that later reads a pawn's position — a camera follow, a held-item attachment point, a selection ring — which should track the smoothed visual, while pathfinding and
cellkeep using the snapped truth.Open questions
speedso a fast pawn does not trail its own feet?PawnViewdetail, or as a general "visual Y lags logical Y" helper that vehicles and haulers reuse later?AC
cell,arrivedand pathfinding still work off the snapped position, so nothing downstream sees the lag.tools/probe_pawn_terrace.gdproduces a trail with dots on the risers rather than a bare vertical gap.