Pawn mover: walk waypoints at a configurable speed #80
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#80
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?
Part of milestone #4. Depends on #77.
The thing that turns a
find_path()result into a capsule moving across the map. Lives onPawnView; the record only holds state.Design:
PawnView.follow(path: PackedVector3Array): stores waypoints and moves toward the next one each_processatspeedtiles per second, consuming waypoints as it reaches them. Empty path is a no-op.map.height_at()) plus half the pawn height, so the capsule rides terraces rather than cutting through them between waypoints.arrivedsignal when the last waypoint is reached;stop()clears the path.stateandcellare updated by the registry on the view's signals, soPawnstays a plain record with no node reference.speedis an@exporton the view and mirrored from the record on spawn, so speed is per pawn and tunable in the inspector.remaining_path()accessor for the debug overlay issue.AC:
PawnViewadded viaadd_child_autofreeand a flatTerrainGrid: afterfollow()and a known total delta, the pawn has moved the expected distance along the path;arrivedfires exactly once;stop()mid-path leaves it where it is.