RealDocs

UBlackboardComponent::SetValueAsRotator

function AIModule Blueprint Since 4.0
#include "BehaviorTree/BlackboardComponent.h"
Access: public Specifiers: UFUNCTIONBlueprintCallable

Description

Sets the FRotator value stored under the given blackboard key, notifying any registered observers if the value changed.

Caveats & Gotchas

  • The parameter is named VectorValue in the engine header even though its type is FRotator — a copy-paste artifact from the vector overload, not a bug in your code.
  • Silently does nothing if KeyName doesn't resolve to a rotator-type key on the blackboard's data asset.
  • Setting the same rotation again does not re-notify observers, since notifications only fire on an actual change.

Signature

void SetValueAsRotator(const FName& KeyName, FRotator VectorValue)

Parameters

Name Type Description Default
KeyName const FName& The name of the rotator blackboard key to write.
VectorValue FRotator The rotation to store under the key. Named VectorValue in the engine header despite being an FRotator.

Return Type

void

Example

Store a desired facing rotation C++
BlackboardComp->SetValueAsRotator(TEXT("DesiredFacing"), TargetActor->GetActorRotation());

Tags

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.