A* Pathfinding Project
3.8.2
The A* Pathfinding Project for Unity 3D
|
Simplifies a path using raycasting. More...
Simplifies a path using raycasting.
This modifier will try to remove as many nodes as possible from the path using raycasting (linecasting) to validate the node removal. Either graph raycasts or Physics.Raycast
Public Member Functions | |
override void | Apply (Path p) |
Main Post-Processing function. | |
bool | ValidateLine (GraphNode n1, GraphNode n2, Vector3 v1, Vector3 v2) |
Check if a straight path between v1 and v2 is valid. | |
Public Member Functions inherited from MonoModifier | |
void | Awake () |
Alerts the Seeker that this modifier exists. | |
void | OnDestroy () |
void | OnDisable () |
void | OnEnable () |
virtual void | PreProcess (Path p) |
Public Member Functions inherited from IPathModifier | |
void | Apply (Path p) |
void | PreProcess (Path p) |
Public Attributes | |
int | iterations = 2 |
LayerMask | mask = -1 |
Vector3 | raycastOffset = Vector3.zero |
bool | subdivideEveryIter |
bool | thickRaycast |
float | thickRaycastRadius |
bool | useGraphRaycasting |
Use raycasting on the graphs. | |
bool | useRaycasting = true |
Public Attributes inherited from MonoModifier | |
Seeker | seeker |
Properties | |
override int | Order [get] |
Properties inherited from MonoModifier | |
abstract int | Order [get] |
Modifiers will be executed from lower order to higher order. | |
Properties inherited from IPathModifier | |
int | Order [get] |
Static Private Attributes | |
static List< Vector3 > | nodes |
To avoid too many memory allocations. | |
|
virtual |
Main Post-Processing function.
Implements MonoModifier.
Check if a straight path between v1 and v2 is valid.
int iterations = 2 |
LayerMask mask = -1 |
|
staticprivate |
To avoid too many memory allocations.
An array is kept between the checks and filled in with the positions instead of allocating a new one every time.
Vector3 raycastOffset = Vector3.zero |
bool subdivideEveryIter |
bool thickRaycast |
float thickRaycastRadius |
bool useGraphRaycasting |
Use raycasting on the graphs.
Only currently works with GridGraph and NavmeshGraph and RecastGraph.
bool useRaycasting = true |
|
get |