A* Pathfinding Project

Support for Raycast Command


#1

It would be great if the Layered Grid Graph used RayCastCommand API, I think that it would help reduce main thread overhead significantly when scanning and updating.
I may implement it myself when I find the time.


#2

I have done some experiments with this (and the burst compiler) recently. It seems to work quite well.
It’s annoying that Unity hasn’t got a batch version of Physics.CheckCapsule and Physics.CheckSphere yet though.


#3

Just wanted to let you know that beta 4.3 (see https://www.arongranberg.com/astar/download) contains WIP code for scanning the grid graph (not layered grid graph though) with the burst compiler.
Unfortunately it seems to be bottlenecked by allocating the node instances as well as calling Physics.CheckCapsule for each node. Physics.CheckCapsule can currently not be jobified in Unity.


#4

I am also looking at what it would take to add support for the raycastOffset to point graphs. It seems like the RaycastModifier supports it but the PointGraph doesn’t support the RaycastModifier (or I misunderstood something). Even if I put my walkable waypoints a little bit above ground, the direct raycasts occasionally clip the edge of stairs and other walkable elements.


#5

@halley
It’s a reasonable suggestion. Would you mind creating a new thread in the Feature Requests category for this?