Saturday, June 25, 2022
HomeGame Developmentprojection - Unreal Engine: UNavigationSystemV1::ProjectPointToNavigation shouldn't be working in editor, at all...

projection – Unreal Engine: UNavigationSystemV1::ProjectPointToNavigation shouldn’t be working in editor, at all times returns false


I am looking for the closest level on navmesh within the editor. The Navigation is constructed however this technique is at all times returns false with any extent. Additionally, UNavigationSystemV1::GetMainNavData() is at all times nullptr. Is it attainable to entry navdata in editor?

    UNavigationSystemV1* NavSys = FNavigationSystem::GetCurrent<UNavigationSystemV1>(GetWorld());
    ANavigationData* NavData = NavSys->GetDefaultNavDataInstance();

    if (!NavSys->ProjectPointToNavigation(CoverPosition, ProjectedPosition, FVector(2.f * CapsuleRadius, 2.f * CapsuleRadius, 2.f * StandCoverHeight)))
    {
        return false;
    }

    CoverPosition = ProjectedPosition.Location;

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments