Layered Grid Graph and ProBuilder

  • A* version: 5.3.8
  • Unity version: 6000.0.39f1

I’m trying to use the layered grid graph, but for some reason, my probuilder meshes have walkable nodes being generated inside the probuilder mesh. Any ideas?

Are these single objects (as in, is a cube a single cube mesh or is it six planes in a trenchcoat)? Can you share your graph settings as well? Kinda hard to deduce from the screenshot alone unfortunately.

Oops! Sorry I somehow missed sending the graph settings.

The bigger object with the slope is one mesh made using probuilder, so I’m not too sure. The cubes are also made using probuilder, and the floor is just a plane. If its any help, I’ve taken a screen shot of the mesh preview for the sloped object:
image

I would recommend one of:

  1. Include the ground in the Obstacle Layer Mask in the grid graph settings, and raise the “Offset” field in the collision testing settings so that the green capsule is above the ground.
  2. Increase the “Character Height” setting, to make the part below the ground too small for the character to fit.

The first method didn’t work, as I need the agent to be able to walk on top of the ramped object as well as the ground.

The second one I feel isn’t a solution for me, as the ramped object’s height will vary.

Is there anything else I can do?

You can increase the offset slightly to make the ramp work as well. As long as your ramps are not too steep it will work.

I don’t think you understand what I’m saying:

If I increase the character height:

This works:

But this won’t:

And stuff like this happens:
image

I need multiple layers. I don’t think increasing the Character height is a suitable solution for my project.

My original thought was that the mesh might’ve been missing a base but even then it probably wouldn’t matter since I’m pretty sure the Probuilder mesh wouldn’t be concave by default (don’t quote me on that).

Honestly if you send me this scene it’ll probably be a little easier to take a look.

Here it is, I can’t upload it directly apparently:

I’ve also noticed it’s not just with Probuilder mesh’s but also unity’s cube mesh.

And this is the result you wanted, correct? Am I understanding this right?

It looks like it was just because your objects aren’t all on the right layer- I simply moved the big sloped ones to the same layer as the others and that was all I needed. (For the floaty guy, Aron’s suggestion about Character Height will stop that, or just raise the object altogether.)

Let me know if there’s a part of this I’m missing :+1:

The floating object represents a second floor of a building, but it appears to work now? I must of somehow messed something up when trying what Aron said, because I remember setting everything to the correct layer, but yeah, thank you, and sorry for wasting your time :slight_smile:

1 Like

Never wasting my time! Always here if you have any more questions :smiley: