t1k:unity:dots-ai:bdp-movement-pack
| Field | Value |
|---|---|
| Module | dots-ai |
| Version | 2.1.7 |
| Effort | high |
| Tools | — |
Keywords: AI navigation, BDP, movement
How to invoke
Section titled “How to invoke”/t1k:unity:dots-ai:bdp-movement-packBDP Movement Pack — Reference
Section titled “BDP Movement Pack — Reference”Movement Pack add-on for Behavior Designer Pro. Provides 10 MonoBehaviour-based movement tasks using NavMesh or A* Pathfinding Project. Verified STABLE on BDP 3.0.2 — MovementBase and all 10 task signatures unchanged from BDP 2.
Namespace: Opsive.BehaviorDesigner.AddOns.MovementPack.Runtime.Tasks
Related skills:
behavior-designer-pro(ECS task patterns) ·agents-navigation(AgentNavigationBridgeSystem) ·dots-rpg(ECS Flee/Patrol equivalents)
MovementBase (Shared Base Class)
Section titled “MovementBase (Shared Base Class)”All 9 pathfinding tasks inherit MovementBase : Action (MoveTowards and RotateTowards do NOT).
Key fields:
[SerializeField] protected Pathfinder m_Pathfinder; // NavMeshAgentPathfinder by defaultpublic SharedVariable<bool> m_StopOnTaskEnd = true; // Stop on task exitprotected Vector3 Velocity => m_Pathfinder.Velocity;protected float RemainingDistance => m_Pathfinder.RemainingDistance;Key methods:
protected bool SetDestination(Vector3 destination) // Set NavMesh targetprotected bool HasPath() // Agent has active pathprotected bool SamplePosition(ref Vector3 position) // Validate NavMesh positionpublic bool HasArrived() // Reached destinationPathfinder swap: Set task.Pathfinder = new AStarPathfinder() to swap from NavMesh to A* at runtime.
Save/Load: MovementBase serializes active destination automatically.
Task Reference
Section titled “Task Reference”→ See references/task-api-guide.md — Cover, Evade, Flee, Follow, MoveTowards, Patrol → See references/task-api-guide-2.md — Pursue, RotateTowards, Seek, Wander
Quick Cheat Sheet
Section titled “Quick Cheat Sheet”| Task | Inherits | Returns | Key Fields |
|---|---|---|---|
Cover | MovementBase | Success on arrival | CoverSearchDistance, CoverLayers, MaxRaycasts=90, LookAtCoverPoint |
Evade | MovementBase | Success when dist > EvadeDistance | Target, EvadeDistance=10, LookAheadDistance=5, DistancePrediction=20 |
Flee | MovementBase | Success when dist > FleedDistance | Target, FleedDistance=20, LookAheadDistance=5 |
Follow | MovementBase | Running (never ends) | Target, FollowRange (min=1, max=3) |
MoveTowards | Action | Success on arrival | Speed=5, ArrivedDistance=0.1, Target or TargetPosition |
Patrol | MovementBase | Running (never ends) | Waypoints[], RandomPatrol, WaypointPauseDuration |
Pursue | MovementBase | Success on arrival | Target, DistancePrediction=20, DistancePredictionMultiplier=20 |
RotateTowards | Action | Success on arrival | Target or TargetRotation, MaxRotationDelta=1, ArrivedAngle=0.5, OnlyY=true |
Seek | MovementBase | Success on arrival | Target or TargetPosition |
Wander | MovementBase | Running (never ends) | Bounds (None/Sphere/Box), WanderDistance (5–10), WanderDegrees (-30–30) |
Key Distinctions
Section titled “Key Distinctions”- Evade vs Flee: Evade predicts target trajectory using velocity; Flee retreats from current position only
- Pursue vs Follow: Pursue predicts intercept point (returns Success on arrival); Follow maintains range (returns Running forever)
- Seek vs MoveTowards: Seek uses NavMesh pathfinding; MoveTowards uses
Vector3.MoveTowards(ignores walls)
DOTS Integration
Section titled “DOTS Integration”Critical: Movement Pack tasks are MonoBehaviour-based. For ECS entities, wrap them using the ECS task pattern.
→ See behavior-designer-pro skill: entity-task-guide.md for the 6-file ECS task structure.
ECS-Native Alternatives
Section titled “ECS-Native Alternatives”These tasks already exist natively in Packages/com.the1studio.dots-bdp/Runtime/AI/BehaviorTrees/Actions/:
| ECS Task | Movement Pack Equivalent | Prefer |
|---|---|---|
Patrol/ | Patrol | ECS (Burst-compiled, no overhead) |
Flee/ | Flee | ECS (DOTS-native) |
SetNavigationToTarget/ | Seek | ECS |
StopMovement/ | m_StopOnTaskEnd | ECS |
Use Movement Pack tasks when:
- Prototyping with GameObjects (non-DOTS entities)
- Need
CoverorWander(no ECS equivalent exists yet) - Need
Evade/Pursuetrajectory prediction without writing ECS system
Use ECS tasks when:
- Working with DOTS entities (always prefer for production)
- Need Burst-compiled performance at scale (100+ units)
AgentNavigationBridgeSystem Integration
Section titled “AgentNavigationBridgeSystem Integration”Movement Pack sets NavMesh destination on NavMeshAgent. In DOTS:
AgentNavigationBridgeSystemreadsNavigationTarget→ writesAgentBody.Destination- Do NOT mix Movement Pack NavMesh calls with Agents Nav on the same entity
Gotchas
Section titled “Gotchas”Coverrequires a non-nullCoverLayersmask — if unset, no raycast hits → returns Failure immediatelyEvadeMaxIterations=0is illegal — auto-corrected to 1 with a warning; always set ≥1MoveTowardspasses through walls — usesVector3.MoveTowards, not NavMesh; no collision avoidanceFollownever returns Success — always Running; wrap in a Selector if you need an exit conditionWanderwithDestinationRetries=1and large arenas — increase retries or widenWanderDegreesto avoid stuck agents- Pathfinder defaults to
NavMeshAgentPathfinder— requiresNavMeshAgentcomponent on the GameObject