A* Pathfinding Project
3.1.4
The A* Pathfinding Project for Unity 3D
|
Adds a navmesh as RVO obstacles. More...
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 | OnDisable () |
Removes this modifier from list of active modifiers. | |
virtual void | OnEnable () |
Adds this modifier to list of active modifiers. | |
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 = null |
Last simulator used. | |
List< ObstacleVertex > | obstacles = new List<ObstacleVertex>() |
Obstacles currently added to the simulator. | |
Additional Inherited Members | |
Public Types inherited from GraphModifier | |
enum | EventType { PostScan, PreScan, LatePostScan, PreUpdate, PostUpdate, PostCacheLoad } |
GraphModifier event type. More... | |
Static Public Member Functions inherited from GraphModifier | |
static void | TriggerEvent (GraphModifier.EventType type) |
Triggers an event for all active graph modifiers. | |
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).
|
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.
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.