Skip to content

Get Random Reachable Point in Radius

At a glance

Lives in: Blueprint API / AI / Navigation - Target: Navigation System V1 - Returns: Random Location plus a Boolean Return Value - Fails by: returning false; the location should not be trusted on failure - Official docs: Get Random Reachable Point in Radius, Navigation System, and AI MoveTo

The one-minute version

  • The node asks the navigation system for a random point on the NavMesh that is reachable from an origin within a radius.
  • Return Value = true means the navigation query found a candidate. It does not promise your Behavior Tree, Move To request, animation, or gameplay goal will succeed.
  • Return Value = false means do not use the output location.
  • Reachable means path-reachable through the selected nav data/filter for the nav agent, not "visually nearby" or "good patrol behavior."
  • Radius is a search area, not a guaranteed travel distance. The returned point is constrained by NavMesh and filters.
  • If it repeatedly fails, debug NavMesh coverage, origin, agent settings, filter class, and the follow-up Move To result.

What it actually does

The query is a navigation request:

flowchart LR
    Origin[Origin point] --> Query[Nav query within radius]
    Nav[NavMesh / NavData] --> Query
    Filter[Navigation filter] --> Query
    Query --> Result[Random reachable location + success bool]

The behavior is roughly:

pseudocode of the engine behavior - not engine source

function GetRandomReachablePointInRadius(Origin, Radius, NavData, Filter):
    NavSystem = get navigation system for this world
    if NavSystem is None:
        return false, invalid/unchanged location

    Data = NavData if provided else main nav data
    Candidate = query Data for random point reachable from Origin within Radius
                using Filter

    if Candidate found:
        return true, Candidate.Location

    return false, invalid/unchanged location

The node does not move the pawn. It chooses a possible destination. You still feed that destination into AI Move To, a Behavior Tree Move To task, or your own movement logic.

When it fails (and what failure does)

Common causes:

  1. No NavMesh covers the origin/search area. Press P in the editor or use the Gameplay Debugger to see the green navigation area.
  2. Origin is off the navigable area. A pawn location in the air, inside collision, or outside bounds can make reachable search fail.
  3. Radius is too small or zero. There may be no navigable candidate in that area.
  4. The nav agent does not match the mesh. Agent radius/height/settings can make a path invalid for this pawn even when another agent could move there.
  5. Filter excludes the area. A navigation filter can reject or heavily cost areas you thought were allowed.
  6. Streaming or runtime generation has not produced nav data yet. Newly loaded areas may need nav generation/update before queries succeed.
  7. You trust the location after false. Do not use the output vector when the Boolean says the query failed.

Failure is the Boolean. There is no exception and no movement request. Branch on the return value before calling Move To.

The pattern everyone actually uses

Simple patrol:

Enemy AIController / Behavior task
-> Get Actor Location(enemy pawn)
-> Get Random Reachable Point in Radius(Origin, 1000)
-> Branch Return Value
    true: AI Move To Destination = Random Location
    false: wait briefly / choose fallback patrol point / print nav debug

Behavior Tree version:

BTTask_FindPatrolPoint
-> get controlled pawn location
-> Get Random Reachable Point in Radius
-> if true: Set Blackboard Vector PatrolLocation
-> Finish Execute Success
-> if false: Finish Execute Fail

The C++ twin, for the curious (our own example code):

bool UFindPatrolPointTask::FindPatrolPoint(
    AAIController* Controller, FVector& OutLocation) const
{
    APawn* Pawn = Controller ? Controller->GetPawn() : nullptr;
    if (!IsValid(Pawn))
    {
        return false;
    }

    UNavigationSystemV1* NavSystem =
        FNavigationSystem::GetCurrent<UNavigationSystemV1>(Pawn->GetWorld());
    if (!NavSystem)
    {
        return false;
    }

    FNavLocation Result;
    const bool bFound = NavSystem->GetRandomReachablePointInRadius(
        Pawn->GetActorLocation(), PatrolRadius, Result);

    OutLocation = Result.Location;
    return bFound;
}

Reachable is not always desirable

The node answers a pathfinding question, not a design question. A reachable point might still be bad because:

  • it is behind the player,
  • it is outside your patrol room,
  • it is too close to a ledge or door,
  • it breaks line of sight in a way your enemy should not choose,
  • it makes the enemy look indecisive.

For "best cover," "keep line of sight but stay far away," or "pick the highest scored tactical point," use Environment Query System (EQS) after the first basic patrol works.

Lookalikes - which one do I want?

Node / system Returns / changes Use when
Get Random Reachable Point in Radius Random path-reachable NavMesh point + success bool Patrol/wander needs a reachable random destination.
Get Random Point in Navigable Radius Random point on nav data near origin Reachability from origin is less important than being on nav data.
AI Move To Movement request result over time You already have a destination and want the pawn to move.
Behavior Tree Move To task Tree-controlled movement task Behavior Tree owns patrol/chase flow.
EQS Query Filtered/scored actor/location result You need "best" point selection, cover, line of sight, or scoring.
Target Points / placed patrol points Authored locations Patrol path should be deliberate and predictable.
Nav Link Proxy Extra nav connection The path is broken by a jump/drop/door gap.

Rule of thumb: Use random reachable points for simple wander. Use authored points for designed patrols. Use EQS when "good point" needs tests and scores.

Going deeper