AI not moving to exact position

Hi I have made a behaviour tree that moves the AI between waypoints then if it sees a finish flag it should go move towards it and end up next to it, however the AI stops right before it gets to the finish flag then the move to sequence flickers.

In the Cpp:

 if (LineOfSightTo(FinishFlag) && CheckInfront(FinishFlag)) // Check finish is a dot product calculation 
    	{
    		GetBlackboardComponent()->SetValueAsVector(TEXT("FinishFlagLocation"), FinishFlag->GetActorLocation());
    		
    	}
    	else
    	{
    		GetBlackboardComponent()->SetValueAsVector(TEXT("RandomWaypoint"), ChooseWaypoint()->GetActorLocation());
    		GetBlackboardComponent()->ClearValue(TEXT("FinishFlagLocation"));
    	}

In the behaviour tree

UPDATE so I have decided to hardcode the values of the flag location (well just in front of it) and it now works. I don’t know why the FinishFlag->GetActorLocation()); isn’t returning the corrent values so I will keep this open

Have you tryed debugging FinishFlag->GetActorLocation(), ie. what value does it exactly returns and how does it differ from the value you’d expect?

Hi, in the behaviour tree it tells me the value and it appears to be correct but I will try this