A* Pathfinding Project
3.8
The A* Pathfinding Project for Unity 3D
|
Adds a navmesh as RVO obstacles. More...
Adds a navmesh as RVO obstacles.
Add this to a scene in which has a navmesh based graph, when scanning (or loading from cache) the graph it will be added as RVO obstacles to the RVOSimulator (which must exist in the scene).
Public Member Functions | |
void | AddGraphObstacles (Pathfinding.RVO.Simulator sim, NavGraph graph) |
Adds obstacles for a graph. | |
override void | OnLatePostScan () |
Called at the end of the scanning procedure. | |
override void | OnPostCacheLoad () |
Called after cached graphs have been loaded. | |
void | RemoveObstacles () |
Removes obstacles which were added with AddGraphObstacles. | |
Public Member Functions inherited from GraphModifier | |
virtual void | OnGraphsPostUpdate () |
Called after graphs have been updated using GraphUpdateObjects. | |
virtual void | OnGraphsPreUpdate () |
Called before graphs are updated using GraphUpdateObjects. | |
virtual void | OnPostScan () |
Called right after all graphs have been scanned. | |
virtual void | OnPreScan () |
Called right before graphs are going to be scanned. | |
Public Attributes | |
float | wallHeight = 5 |
Height of the walls added for each obstacle edge. | |
Private Attributes | |
Simulator | lastSim |
Last simulator used. | |
readonly List< ObstacleVertex > | obstacles = new List<ObstacleVertex>() |
Obstacles currently added to the simulator. | |
Additional Inherited Members | |
Public Types inherited from GraphModifier | |
enum | EventType { PostScan = 1 << 0, PreScan = 1 << 1, LatePostScan = 1 << 2, PreUpdate = 1 << 3, PostUpdate = 1 << 4, PostCacheLoad = 1 << 5 } |
GraphModifier event type. More... | |
Static Public Member Functions inherited from GraphModifier | |
static void | FindAllModifiers () |
static void | TriggerEvent (GraphModifier.EventType type) |
Triggers an event for all active graph modifiers. | |
Protected Member Functions inherited from GraphModifier | |
virtual void | OnDisable () |
Removes this modifier from list of active modifiers. | |
virtual void | OnEnable () |
Adds this modifier to list of active modifiers. | |
void AddGraphObstacles | ( | Pathfinding.RVO.Simulator | sim, |
NavGraph | graph | ||
) |
Adds obstacles for a graph.
|
virtual |
Called at the end of the scanning procedure.
This is the absolute last thing done by Scan.
Reimplemented from GraphModifier.
|
virtual |
Called after cached graphs have been loaded.
When using cached startup, this event is analogous to OnLatePostScan and implementing scripts should do roughly the same thing for both events.
Reimplemented from GraphModifier.
void RemoveObstacles | ( | ) |
Removes obstacles which were added with AddGraphObstacles.
|
private |
Last simulator used.
|
private |
Obstacles currently added to the simulator.
float wallHeight = 5 |
Height of the walls added for each obstacle edge.
If a graph contains overlapping you should set this low enough so that edges on different levels do not interfere, but high enough so that agents cannot move over them by mistake.