DoN's 3D-Pathfinding / Flying-AI system (with full source!)

Thanks for the 4.12 update, @!

Also, just wanted to let you know that I was able to fix the ensure(MyNavData) crash in this function…


void UPathFollowingComponent::RecacheNavigationData()
{
	if (MovementComp != NULL)
	{
		const FNavAgentProperties& NavAgentProps = MovementComp->GetNavAgentPropertiesRef();

		if (ensure(GetWorld() && GetWorld()->GetNavigationSystem()))
		{
			MyNavData = GetWorld()->GetNavigationSystem()->GetNavDataForProps(NavAgentProps);
			// we should get something by now!
			ensure(MyNavData);
		}
	}
}

…by destroying the default PathFollowingComponent in my project’s AI controller constructor:


APFAIController::APFAIController(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
{
	bUpdatePitchWithFocus = true;

	PathFollowingComponent->DestroyComponent();
	PathFollowingComponent = nullptr;
}


Kinda ugly and not sure how safe it is, but everything seems OK for now.