Skip to content

Add direct target navigation for world workers - #23

Draft
SimGamerJen wants to merge 2 commits into
agent/world-workers-alpha4-curved-movementfrom
agent/world-workers-alpha4-target-navigation
Draft

Add direct target navigation for world workers#23
SimGamerJen wants to merge 2 commits into
agent/world-workers-alpha4-curved-movementfrom
agent/world-workers-alpha4-target-navigation

Conversation

@SimGamerJen

Copy link
Copy Markdown
Owner

Summary

Builds on the validated curved-walk locomotion and adds destination-driven movement without introducing pathfinding yet.

Commands

  • hpWorld goto [slot] <x> <z>
  • hpWorld come [slot] [standOffMetres]

Aliases:

  • walkto
  • cometo
  • walktome

Behaviour

  • reuses the proven straight-walk graphics-state initializer
  • hands movement to the validated bounded-yaw curved controller
  • keeps rotationVelocity=0
  • keeps native-style forward walking gait, acceleration/braking, terrain-height following and persistence
  • goto walks directly to absolute world X/Z coordinates
  • come snapshots the local player's current position and computes a stopping point short of the player
  • default player stand-off is 1.8 m (clamped to 0.75–5.0 m)
  • direct-navigation range is capped at 100 m for this prototype

Scope

This is still direct steering only. It does not avoid buildings, fences, vehicles or other obstacles and it does not continuously follow the player after come is issued.

Test focus

  1. Confirm [WorldNavigation] Loaded ... target-navigation-1 appears.
  2. Place A outdoors with open ground between worker and player.
  3. Move 8–15 m away and run hpWorld come A.
  4. Confirm A turns while walking, approaches smoothly and stops around 1.8 m away without jitter.
  5. Move elsewhere and run hpWorld come A 2.5 to validate a different stand-off.
  6. Optionally test hpWorld goto A <x> <z> with nearby known map coordinates.
  7. Confirm final position/facing persist after the movement completes.

If this passes visually, the next logical layer is continuous/re-targetable following and then obstacle/path navigation.

Copy link
Copy Markdown
Owner Author

Acceptance result: PASS

User visually confirmed the direct target-navigation tests looked good, including the longer come approaches.

Validated together with the clean log results:

  • native-style walking gait remains stable over longer journeys
  • heading changes remain smooth with no observed jitter
  • come reaches the computed stand-off correctly
  • alternate stand-off values work
  • goto reaches explicit X/Z targets correctly
  • final position/facing persist
  • no locomotion/navigation Lua errors observed during the tests

Treat this PR as the known-good checkpoint for destination-driven direct navigation. Next phase: continuous retargeting/follow behaviour, still reusing this locomotion controller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant