Character does not rotate to next point

after checking the behavior tree, this is the following execution flow

  1. find waypoint
  2. move to waypoint
    3.rotate to next waypoint
    4.wait

as you can see, the character tries to rotate before assigning a new waypoint. i dont know how in Bens lecture it did turn though…

You are right outcome Ben’s code Character wouldn’t turn on.
In my Editor my Version is 4.15.3 Rotate to Face BBEntry node is not work at all.
and does it work in your code???

I don’t know what’s happened but now (another day) it’s work fine. I don’t change anything
in my code I add another Blackboardkey into chooseNextWaypoint.h

UPROPERTY(EditAnywhere, Category = "Blackboard")
struct FBlackboardKeySelector RotateNextWayPoint;

in ChooseNextWaypoint.cpp

auto Length = PatrolPoints.Num();
	Index++;
	Index%=Length;
	Blackboardkey->SetValueAsInt(IndexKey.SelectedKeyName, Index);

	//UE_LOG(LogTemp, Warning, TEXT("2_Index = %i"), Index);
	//UE_LOG(LogTemp, Warning, TEXT("================================"));
	Blackboardkey->SetValueAsObject(RotateNextWayPoint.SelectedKeyName, PatrolPoints[Index]);

and then I pass this Value RotateNextWayPoint Unreal Editor

The next waypoint is not yet set, so “rotate to the next waypoint” will rotate to the waypoint the character just reached.

But: in the “Move To” node there is an “Acceptable Radius” setting, the character will try to end inside this radius around the waypoint. So if the character stops a little before the waypoint you’ll see no turning, but if he overruns the waypoint a bit he will turn back.

Privacy & Terms