CARLA
Loading...
Searching...
No Matches
UCarlaNavigationSubsystem Class Reference

Thin wrapper over the engine navigation system (UNavigationSystemV1) used by the server-side pedestrian navigation RPCs. More...

#include <CarlaNavigationSubsystem.h>

Inheritance diagram for UCarlaNavigationSubsystem:

Public Member Functions

bool GetRandomNavLocation (FVector &OutLocation) const
 Random point on the loaded navmesh where a walker can stand, in world-local centimeters.
bool HasServerSideNavigation () const
 True iff the current world has a RecastNavMesh with valid nav data: the signal for clients that walker navigation runs server-side here.

Static Public Member Functions

static UCarlaNavigationSubsystem * Get (UWorld *World)

Private Types

enum class  ERejectReason : uint8 { None , NotStreamed , Overlap }
 Why a sampled nav point was rejected, for the Verbose log. More...

Private Member Functions

ERejectReason CheckWalkerLocation (const FVector &Location, const class ANavigationData &NavData) const
 Checks a sampled nav point: on World Partition maps the cells around it must be activated (so a building above it is already there), and a walker-sized capsule standing on it must not overlap static geometry.

Detailed Description

Thin wrapper over the engine navigation system (UNavigationSystemV1) used by the server-side pedestrian navigation RPCs.

On World Partition maps the navmesh streams with the cells, so every query below operates on the currently loaded tiles only.

Definition at line 21 of file CarlaNavigationSubsystem.h.

Member Enumeration Documentation

◆ ERejectReason

enum class UCarlaNavigationSubsystem::ERejectReason : uint8
strongprivate

Why a sampled nav point was rejected, for the Verbose log.

Enumerator
None 
NotStreamed 
Overlap 

Definition at line 48 of file CarlaNavigationSubsystem.h.

Member Function Documentation

◆ CheckWalkerLocation()

UCarlaNavigationSubsystem::ERejectReason UCarlaNavigationSubsystem::CheckWalkerLocation ( const FVector & Location,
const class ANavigationData & NavData ) const
private

Checks a sampled nav point: on World Partition maps the cells around it must be activated (so a building above it is already there), and a walker-sized capsule standing on it must not overlap static geometry.

Definition at line 129 of file CarlaNavigationSubsystem.cpp.

References None, NotStreamed, and Overlap.

Referenced by GetRandomNavLocation().

◆ Get()

UCarlaNavigationSubsystem * UCarlaNavigationSubsystem::Get ( UWorld * World)
inlinestatic

Definition at line 27 of file CarlaNavigationSubsystem.h.

Referenced by FCarlaServer::FPimpl::BindActions().

◆ GetRandomNavLocation()

bool UCarlaNavigationSubsystem::GetRandomNavLocation ( FVector & OutLocation) const

Random point on the loaded navmesh where a walker can stand, in world-local centimeters.

Points whose surroundings are still streaming in, or where a walker capsule would overlap static geometry (the terrain under a building footprint, issue #10212), are resampled; returns false when no acceptable point is found.

Definition at line 57 of file CarlaNavigationSubsystem.cpp.

References CheckWalkerLocation(), None, NotStreamed, and Overlap.

◆ HasServerSideNavigation()

bool UCarlaNavigationSubsystem::HasServerSideNavigation ( ) const

True iff the current world has a RecastNavMesh with valid nav data: the signal for clients that walker navigation runs server-side here.

Definition at line 44 of file CarlaNavigationSubsystem.cpp.


The documentation for this class was generated from the following files: