Skip to content

t1k:unity:dots-ai:bdp-movement-pack

FieldValue
Moduledots-ai
Version2.1.7
Efforthigh
Tools

Keywords: AI navigation, BDP, movement

/t1k:unity:dots-ai:bdp-movement-pack

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)


All 9 pathfinding tasks inherit MovementBase : Action (MoveTowards and RotateTowards do NOT).

Key fields:

[SerializeField] protected Pathfinder m_Pathfinder; // NavMeshAgentPathfinder by default
public SharedVariable<bool> m_StopOnTaskEnd = true; // Stop on task exit
protected Vector3 Velocity => m_Pathfinder.Velocity;
protected float RemainingDistance => m_Pathfinder.RemainingDistance;

Key methods:

protected bool SetDestination(Vector3 destination) // Set NavMesh target
protected bool HasPath() // Agent has active path
protected bool SamplePosition(ref Vector3 position) // Validate NavMesh position
public bool HasArrived() // Reached destination

Pathfinder swap: Set task.Pathfinder = new AStarPathfinder() to swap from NavMesh to A* at runtime. Save/Load: MovementBase serializes active destination automatically.


→ See references/task-api-guide.md — Cover, Evade, Flee, Follow, MoveTowards, Patrol → See references/task-api-guide-2.md — Pursue, RotateTowards, Seek, Wander

TaskInheritsReturnsKey Fields
CoverMovementBaseSuccess on arrivalCoverSearchDistance, CoverLayers, MaxRaycasts=90, LookAtCoverPoint
EvadeMovementBaseSuccess when dist > EvadeDistanceTarget, EvadeDistance=10, LookAheadDistance=5, DistancePrediction=20
FleeMovementBaseSuccess when dist > FleedDistanceTarget, FleedDistance=20, LookAheadDistance=5
FollowMovementBaseRunning (never ends)Target, FollowRange (min=1, max=3)
MoveTowardsActionSuccess on arrivalSpeed=5, ArrivedDistance=0.1, Target or TargetPosition
PatrolMovementBaseRunning (never ends)Waypoints[], RandomPatrol, WaypointPauseDuration
PursueMovementBaseSuccess on arrivalTarget, DistancePrediction=20, DistancePredictionMultiplier=20
RotateTowardsActionSuccess on arrivalTarget or TargetRotation, MaxRotationDelta=1, ArrivedAngle=0.5, OnlyY=true
SeekMovementBaseSuccess on arrivalTarget or TargetPosition
WanderMovementBaseRunning (never ends)Bounds (None/Sphere/Box), WanderDistance (5–10), WanderDegrees (-30–30)
  • 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)

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.

These tasks already exist natively in Packages/com.the1studio.dots-bdp/Runtime/AI/BehaviorTrees/Actions/:

ECS TaskMovement Pack EquivalentPrefer
Patrol/PatrolECS (Burst-compiled, no overhead)
Flee/FleeECS (DOTS-native)
SetNavigationToTarget/SeekECS
StopMovement/m_StopOnTaskEndECS

Use Movement Pack tasks when:

  • Prototyping with GameObjects (non-DOTS entities)
  • Need Cover or Wander (no ECS equivalent exists yet)
  • Need Evade/Pursue trajectory 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)

Movement Pack sets NavMesh destination on NavMeshAgent. In DOTS:

  • AgentNavigationBridgeSystem reads NavigationTarget → writes AgentBody.Destination
  • Do NOT mix Movement Pack NavMesh calls with Agents Nav on the same entity

  • Cover requires a non-null CoverLayers mask — if unset, no raycast hits → returns Failure immediately
  • Evade MaxIterations=0 is illegal — auto-corrected to 1 with a warning; always set ≥1
  • MoveTowards passes through walls — uses Vector3.MoveTowards, not NavMesh; no collision avoidance
  • Follow never returns Success — always Running; wrap in a Selector if you need an exit condition
  • Wander with DestinationRetries=1 and large arenas — increase retries or widen WanderDegrees to avoid stuck agents
  • Pathfinder defaults to NavMeshAgentPathfinder — requires NavMeshAgent component on the GameObject