BT LookAt -
use stock UBTTask_RotateToFaceBBEntry
TL;DR: Unreal Engine ships
UBTTask_RotateToFaceBBEntry. It covers LookAt + TurnInPlace
use cases. Use it.
Pattern
- In your BT graph: right-click → Add Task → "Rotate to Face BB Entry".
- Configure:
BlackboardKey: a Vector key (target location) or Object key (target actor).Precision: degrees of yaw tolerance to count as facing.
- Task returns
Succeededwhen the agent's rotation is withinPrecisionof the target direction.
The stock task uses the AIController's SetFocus /
ClearFocus mechanism so the pawn's rotation continues
smoothly even after the task ends (if you want that, use
UBTService_DefaultFocus to keep focus while a parent node
is active).
Why
we didn't ship LCM_BTTask_LookAt or
LCM_BTTask_TurnInPlace
Both planned variants do exactly what
UBTTask_RotateToFaceBBEntry already does:
LookAt: rotate-toward-target with interp speed → stock task has built-in smooth interp via the AIController focus systemTurnInPlace: constant-rate rotation toward target → stock task supports configurable interp rate
The LCM Nav3D StateTree variants (FLcmSTTask_LookAt,
FLcmSTTask_TurnInPlace) are shipped because StateTree on
5.2 has no stock rotation task - but BT has one since 4.x.
When to write a custom LCM Nav3D rotation task
The only case where stock doesn't work: you need
physics-integrated banking matching the flying-pawn
locomotion style. That's already integrated into
LCM_BTTask_FlyTo's rotation phase. If you want
LookAt-without-translation but WITH banking, fold it into FlyTo with a
tiny step size or use the StateTree variant which does have
banking-aware rotation.
For >95% of "face the target" use cases, stock
UBTTask_RotateToFaceBBEntry is the right answer.