Providers and Troubleshooting
Movement Agent coordinates navigation ownership, provider access, pause/resume, destination state, stuck detection, and traversal requests. The included provider uses Unity NavMesh. Select the component and provider for the actor before tuning the graph’s arrival and recovery rules.
Unity NavMesh setup
The NavMesh Movement Provider uses NavMesh Agent on the controlled object unless an explicit Agent reference is supplied. Area Mask controls position sampling; keep it consistent with the agent’s permitted areas. Bake a connected surface for the correct agent type and confirm the object is placed on it.
Speed, acceleration, radius, stopping distance, and local avoidance belong to NavMesh Agent. The movement Action determines intent, replan timing, completion, and detailed results. Progress Epsilon and Stuck Duration on Movement Agent define how far the actor must move within the progress window before it is diagnosed as stuck. Suspended or pending-path movement is excluded from that stuck test.
This release includes Unity NavMesh support. It does not include a State Designer A* Pathfinding Project provider. Behavior Designer Pro Pathfinder integrations use a different API and cannot be assigned directly to Movement Agent.
Troubleshooting
| Symptom | Check and fix |
|---|---|
| The Action finishes but the actor did not arrive | Inspect Result. Invalid Agent, Destination Rejected, Path Invalid, Path Partial, Stuck, and Timed Out also finish a navigation Action. Use a core Condition or ConditionDelegate that reads Result for success and recovery transitions.
If Result is Succeeded, check the selected completion rule. Duration means time elapsed, while Arrival and Stable Arrival check arrival. A larger NavMesh stopping distance also increases the effective Seek arrival threshold. |
| The actor does not move | Check for Invalid Agent first: a missing or disabled NavMesh Agent, an object outside navigation data, or an uninitialized custom provider cannot navigate. Auto Add Movement Agent adds the coordinator, not the underlying navigation setup.
For Ownership Denied, find the Action that already owns movement. Run one navigation movement Action per actor. For Invalid Target, check the destination/threat input rather than the actor’s controlled target field. |
| Follow jitters or fails to stop | Check Minimum Distance, Maximum Distance, and Hysteresis. A useful band and a positive hysteresis tolerate small target and path changes. The Action samples target Transform motion, so abrupt animation, teleports, or network corrections affect its speed estimate.
Inspect other movement writers if the destination is stable but position oscillates. Coordinate root motion, Rigidbody movement, controller scripts, and NavMesh position updates through one active movement workflow. |
| A path stays partial or the Action stays Running | Check whether target and actor lie on connected navigation data with matching agent type and area permissions. A sampled point near the destination does not prove a route exists.
Allow Partial Path lets the Action continue on an incomplete route; it does not permit the built-in provider to report complete arrival on that partial path. Add a timeout or a deliberate recovery transition when the target may remain unreachable. A continuous Action intentionally stays Running after an ordinary arrival event. |
| A replacement target is ignored | Follow, Flee, Pursue, and Evade cache the target Transform when starting. A new GameObject value takes effect on a fresh Action run. Leave and re-enter the state after replacing the target, or use Seek when current-input replanning is the desired behavior. See Runtime Targets and State Patterns. |
| Pursue overshoots or Evade finishes unexpectedly | Check Maximum Prediction, target velocity, and whether teleports or external Rigidbody updates produce a velocity spike. Lower the prediction horizon for discontinuous motion. Pursue tests stable distance from the actual target. Evade tests safety across its prediction horizon, so its result differs from a simple current-distance Condition. |
| Cover cannot find a usable point | Enable Debug Cover and inspect Cover Failure. Check the threat input, physical cover collider, layer masks, foot-level origin, body dimensions, occupancy, reservations, and complete route. Broadening Search Radius does not fix an exposed or obstructed candidate. See Cover for budget and stance diagnostics. |
| Navigation stops at a link | Check MovementAgent.HasTraversalRequest or Result: Traversal Required. The provider intentionally hands off off-mesh movement. Read the request, run the external traversal, and complete the handoff with MovementAgent.Resume(null, completeTraversal: true). See Traversal Integration. |
Extend a provider
For developers, derive from MovementProvider in Opsive.StateDesigner.AddOns.MovementPack.Runtime.Navigation and assign it to MovementAgent. Implement initialization, destination requests, position sampling, movement state, arrival, stopping, resuming, and path reset. Use MovementAgent.SetProvider when selecting a provider from code.
Override IsDestinationReachable and TryGetPathDistance to validate complete routes without changing the active destination. The base reachability fallback samples a position and its distance fallback measures a straight line; neither provides a custom navigation system’s complete route guarantee. Cover selection depends on those guarantees for safety and scoring.
Implement TryGetTraversalRequest and CompleteTraversal only when the provider supports an external handoff. Report pending, partial, invalid, and complete path state consistently so the movement Actions and application transition checks can make correct decisions.
Support
Use the State Designer debugging guide to inspect the active state and transition order. Include the Action type, Result, provider, Unity version, and a small reproducible graph when contacting Opsive support.
Settings reference
| Component or task | Setting | Default | Description |
|---|---|---|---|
| Movement Agent settings | Provider | new NavMeshMovementProvider() | The provider that performs pathfinding and movement. |
| Progress Epsilon | 0.05f | The minimum world-space progress that resets stuck detection. | |
| Stuck Duration | 1.5f | The time without meaningful progress before the agent is considered stuck. | |
| Movement Provider settings | Agent | Default | The NavMeshAgent used by the provider. When empty it is resolved from the movement GameObject. |
| Area Mask | NavMesh.AllAreas | The NavMesh area mask used for position sampling. | |
| Movement Types settings | Type | None | The provider-defined traversal type. |
| Start | Default | The world-space traversal start. | |
| End | Default | The world-space traversal end. | |
| Direction | Default | The preferred traversal direction. | |
| Options | — | Movement Result values: None, Running, Succeeded, InvalidAgent, InvalidTarget, DestinationRejected, NoWaypoints, NoCoverFound, CoverOccupied, PathInvalid, PathPartial, TimedOut, Stuck, OwnershipDenied, OwnershipLost, TraversalRequired, Cancelled. | |
| Options | — | Movement Path Status values: Unknown, Pending, Complete, Partial, Invalid. | |
| Options | — | Movement Completion Mode values: Arrival, StableArrival, Duration, Continuous. | |
| Options | — | Patrol Route Mode values: Sequential, PingPong, Random. |