UCC + A* (AIPath): who should rotate the character — UCC (“Rotate Towards”) or AIPath (enableRotation)?

PabloEsko

Member
Environment
Unity [6.2], Ultimate Character Controller, Behavior Designer Pro, A* Pathfinding Project Pro (AIPath/RichAI).


Scenario
  • The character is driven by Ultimate Character Controller and the behavior tree is built with Behavior Designer.
  • Pathfinding/movement to targets uses A* (AIPath).
  • Requirements: while running, sometimes the character must keep looking at a target; in other moments (attack/interaction) it must quickly snap/rotate toward the target.
Problem
I’m running into rotation conflicts between systems:
  • With AIPath Enable Rotation turned on, AIPath rotates the character in the movement direction.
  • When I trigger Rotate Towards from Behavior Designer (or try to set rotation directly), the rotation starts “tug-of-war” between systems or gets ignored. UCC docs also caution against setting transform.rotation directly — the controller/abilities should drive rotation. What is the correct way to assign rotation authority?
What I tried

A) UCC is the source of truth

  • AIPath.enableRotation = false.
  • Rotation is handled by the UCC Rotate Towards ability, started/stopped from BD exactly when needed (attacks, interactions, “look at target while moving”, etc.). Works well in practice; I’d like to confirm this is the recommended approach.
B) A* is the source of truth
  • AIPath.enableRotation = true.
  • On the UCC side, I disable any competing rotation (e.g., Root Motion Rotation or relevant states/abilities) during travel so there’s no double control.
  • Question: any gotchas here with Movement Types/animations when letting AIPath own rotation during locomotion?

Questions for the community/devs
  1. Which approach is considered correct for UCC + A* integration? Is there an “official” recommendation to converge on a single rotation source — and if yes, which one? (Right now I favor A: UCC rotates, A does not*.)
  2. Is it safe to switch rotation authority dynamically (e.g., while running AIPath rotates; upon arrival/attack UCC takes over), or is it better not to mix within the same frame and keep it consistent per state?
  3. For “look at the target while running”, is it better to:
    • keep enableRotation = false and run UCC Rotate Towards continuously toward the target while AIPath only handles translation, or
    • keep enableRotation = true and solve “look at” through the Movement Type/camera aim without Rotate Towards? Any best practices?
 
You should have UCC do the rotation. I haven't looked at the method AIPath uses for rotation, but I would have expected UCC to override the rotation. I would not use AIPath to rotate at all, and just rely on UCC for the rotation.
 
Back
Top