Skip to content
Bit Quirky Behavior Trees and
State Machines

Search documentation

All topics and APIs

Close returns focus to Search.

What are you looking for?

Try a common topic or enter a complete API identifier.

Browse the reference instead

Esc closes · Tab reaches results · Enter opens the focused link

v0.6.0
Menu

Move somewhere

Move To sends one movement request to your own locomotion code and stays Running until that code says it arrived.

“Go there, tell me when you arrive.” Move To is the one node that ships with that shape built in, and it gets there using whatever locomotion your game already has.

Every project has its own way of moving a character: a CharacterController, a NavMeshAgent, a custom kinematic controller, a physics body with steering. A graph that moved Transforms itself would fight all four. A graph that only calls your movement code needs a node whose whole job is “ask, then wait”.

Move To is that node. It carries a destination and two settings, hands one request to the movement service, and holds Running until the service reports what happened.

  • Walk to a fixed post or waypoint, like move to the first waypoint in DocumentationLeafNodes.bqbehavior.
  • Reposition before other work in a Sequence: move to the console, then use it.
  • Timed approach, wrapped in a Time Limit, so an unreachable destination ends the branch instead of parking the agent.
Move To with an authored destination
Figure 1. The destination lives on the node. The movement lives in your adapter.

While the request is outstanding the node holds the status pill at RUNNING, then takes SUCCESS on arrival. Bind your own IBehaviorMovementAdapter first, because nothing moves without it.

  1. Open Assets/Platformer/Behavior/DocumentationLeafNodes.bqbehavior and select move to the first waypoint.

  2. The rail shows TARGET WORLD SPACE · METERS with X, Y, and Z fields. This node holds 6.5, 3.8, 0.

  3. Below the target sit Speed, in meters per second, and Arrival tolerance, in meters. The fixture uses 2 and 0.1. Tolerance is how close counts as arrived, which is what stops a controller oscillating around an exact point.

  4. Implement IBehaviorMovementAdapter in your game. Five methods: begin one request, advance it by a time step, pause, resume, and stop.

  5. Register it with BehaviorMovementService and make sure the graph declares the movement service. The agent needs that service composed before it can run a Move To at all.

  6. Run it. The node stays Running while your adapter advances, and reports Success the moment the adapter says the request completed.

Move To is an action with an awaited external service. Its first evaluation issues the request and returns Running; later evaluations read the completion.

Result

Success
The movement service reported the request completed.
Failure
The service reported the request failed, or refused a valid request.
Running
The request is outstanding and the adapter is still advancing it.
  • The node never touches a Transform or an entity itself. It emits one request carrying the target, speed, and tolerance, and your adapter does the moving.
  • GameObject hosts compose BehaviorMovementService around an IBehaviorMovementAdapter. Entity hosts supply a compatible command handler for the same movement token.
  • One request at a time. The service refuses a second request while one is active, which surfaces as a typed refusal rather than two controllers fighting.
  • An interrupt or a Time Limit cancels this exact request by its correlation identity. The adapter’s Stop is where you make the character actually stop.
  • Movement requests do not support authority replay. After a handoff the request is restarted rather than resumed mid-flight.
  • A late completion cannot revive a request the tree has already abandoned.

When it goes wrong

SymptomCheckFix
Nothing moves and the node holds Running forever.Confirm the movement service is composed on this agent and your adapter is registered with it.Register the adapter, then confirm the graph declares the movement service.
The node fails immediately.Read what your adapter returns from Begin. A refused request fails the node.Accept the request, or return a failure you actually intend.
The agent stops short or overshoots.Compare Arrival tolerance with your controller step size.Widen the tolerance past one movement step.
Two movement requests fight.Look for a second agent or a game script also driving locomotion.Leave one owner. The service refuses overlapping requests by design.
The character keeps walking after an interrupt.Check what your adapter does in Stop.Cancel the motion there, and clear any velocity your controller holds.
The node succeeds while the character is nowhere near the target.Read the status your Advance returns.Report completion only when the backend has actually arrived.
Full-size image