Support Forum

Pathing on the inside edge of a spinning spacestation

Hi,
The task I’m trying to do is navigate on the inside edge of a spinning space-station. You might imagine it like walking around halo.

I want to accomplish it using navmesh and an AI controlled with a rigidbody. This would make it easier to interact with my other systems.

However, I am struggling to make the AI walk after the angle of the floor has passed directly up. I have got the pathfinding working, but from what I understand, there seems to be an issue with the funnel algorithm working correctly pass that extreme angle.

The best I can get is for RichFunnel.Update() / FindNextCorners() to fill the buffer/funnelPath with a single corner (there are currently no obstacles) that ends when the path’s angle becomes too extreme.

I was hoping for some insight, Am I approaching it in the wrong way? I’m trying to avoid getting my hands too deep in the code, but I can’t seem to get the result I want.

Thanks.

Hi

That’s pretty tricky.

It’s doable though.
You will have to use the beta version to get support for spherical worlds (can be downloaded here https://www.arongranberg.com/astar/download, see documentation about spherical worlds here: https://www.arongranberg.com/astar/documentation/dev_4_3_45_d1e5882a/spherical.html).
You will also have to use the LocalSpaceGraph and LocalSpaceRichAI scripts to make it possible to rotate the space-station. You can take a look at the example scene called “Moving” to see an example of how those work. Essentially they conspire to make it seem like the graph is moving, while it actually stays in the same spot.

The funnel modifier will work in the beta for non-planar worlds if you check the unwrap and split at every portal options. See https://www.arongranberg.com/astar/documentation/dev_4_3_45_d1e5882a/funnelmodifier.html