Hi,
I’m having trouble getting an agent to follow a path between levels with a LayerGridGraph. My test level has a balcony connected by ramps.
If I use the sample code as per the “Getting Started/Moving Stuff Around” tutorial, the path is calculated correctly (going by the gizmos), but the agent tends to get stuck while following it. It seems to go too close to obstacles and bounce off. Re-pathing results in continual bouncing. I tried changing the collision size/shape, agent height and turning off corner cutting to no avail.
If I use the Minebot prefab from the samples instead, it follows really well until I go up to the balcony, and then it won’t follow. My preliminary investigation shows that the method to get the closest node to the target is returning a result quite far from the actual target, I believe the closest ground floor point below the edge of the balcony. If I start with the bot on the balcony, it happily walks around on the balcony but won’t come down.
Any solution to either/both approaches would be appreciated. If it will help I can post some screenshots when I get home.
Thanks,
David
Edit:
- Corrected LevelGridGraph to LayerGridGraph. Easy typo to make because it has multiple levels
- I’m not sure whether something changed, or perhaps I was seeing things, the tutorial code does not seem to be correctly pathing up/down the ramps.
- My graph seems to have 2 layers. How is the ramp meant to work? Is it in one of/both of those layers? Do you need to manually add a connection between the layers or does Scanning resolve the ramp for you?