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 = truemeans the navigation query found a candidate. It does not promise your Behavior Tree, Move To request, animation, or gameplay goal will succeed.Return Value = falsemeans 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:
- No NavMesh covers the origin/search area. Press
Pin the editor or use the Gameplay Debugger to see the green navigation area. - Origin is off the navigable area. A pawn location in the air, inside collision, or outside bounds can make reachable search fail.
- Radius is too small or zero. There may be no navigable candidate in that area.
- 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.
- Filter excludes the area. A navigation filter can reject or heavily cost areas you thought were allowed.
- Streaming or runtime generation has not produced nav data yet. Newly loaded areas may need nav generation/update before queries succeed.
- 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¶
- AI Move To & the NavMesh - movement requests and NavMesh setup.
- Behavior Trees and Blackboards for Blueprint Beginners
- Behavior Tree ownership and Blackboard facts.
- Simple Patrol, Chase, Attack, and AI Debugging
- building the first enemy loop.
- EQS query basics after the first Behavior Tree
- when random points stop being enough.
- Nav Link Proxy and navigation modifier boundaries
- fixing broken navigation topology.
- Official docs: Get Random Reachable Point in Radius, Basic Navigation, and AI MoveTo.
- Engine source (requires engine access - we do not reproduce it here):
UNavigationSystemV1::K2_GetRandomReachablePointInRadiusandUNavigationSystemV1::GetRandomReachablePointInRadiusinEngine/Source/Runtime/NavigationSystem/Private/NavigationSystem.cpp; declarations inEngine/Source/Runtime/NavigationSystem/Public/NavigationSystem.h.