Opsive Character Controllers
The Opsive Character Controllers integration lets Behavior Designer express AI
intent while the character controller owns locomotion, abilities, items, and
animation.
Before you begin
Install Behavior Designer, the supported Opsive Character Controller, the
Behavior Designer integration, and any task pack used by the example tree. A
NavMesh-driven tree also needs a baked NavMesh and the character controller’s
NavMesh movement setup.
Configure an AI character
- Create or update the character with AI Agent enabled in the Character
Manager. Enable NavMeshAgent when using Unity navigation. - Import
UltimateCharacterController.unitypackagefrom the Behavior Designer
Integrations folder or the Opsive downloads page. - Run the integration’s Behavior Tree Agent setup on the character. Confirm it
adds the Behavior Tree and Character Controller bridge components. - Assign the tree and configure the shared targets, destinations, and ability
inputs used by its integration tasks.
For the character-side creation and navigation options, see
Character Creation
and NavMeshAgent Movement.
Design the behavior tree
Arrange top-level Selector branches from highest priority on the left to lowest
priority on the right. A practical combat tree may use this order:
- Recover critical ammo or health.
- Attack a visible target.
- React to damage.
- Investigate a heard target.
- Search the last known position.
- Patrol as the fallback.
Give responsive branches Lower Priority conditional aborts so a visible
threat can interrupt patrol or search. Use Self where a running attack must
stop when its own range, visibility, or alive condition becomes false.
Use integration tasks to start and stop character abilities or items. Use
Movement Pack tasks to choose destinations when appropriate, while the
character controller’s movement ability converts navigation output into
locomotion and animation. This keeps Animator operations out of the tree; see
Syncing Animations.
Share character state
Map local variables to stable character properties when the tree needs health,
ammo, or another controller-owned value. Use the
Variable Synchronizer only when a continuously
synchronized adapter is clearer than direct property mapping or an integration
task.
Verify in Play Mode
Start with a small tree that seeks one destination and starts one ability.
Confirm that:
- the NavMeshAgent is on the baked NavMesh;
- the movement ability follows the requested destination;
- the Behavior Tree task remains Running until movement completes;
- a higher-priority condition interrupts movement and stops any ability that
should not continue.
If the tree turns green but the character does not move, inspect the character’s
NavMesh movement ability and agent placement. If the character moves but the
task never completes, compare the integration task’s arrival settings with the
controller’s stopping distance. If an ability survives an abort, add the
matching stop task or cleanup path.