Walk on top of avoided object

I want that my units walk around e.g a Cube. That’s finde. The cube is layered as “Obstacle” which should be avoided.
Now I want to add a ramp to get on top of the object. The ramp has the Layer"Stair"

How do I realize this?

Hi

You will have to include the cube in the height testing layer mask in the grid graph settings.
You probably also want to mark it as not being an obstacle. The height difference will mean that it still won’t be possible to walk right into it.

Okay, I gotthat, but currently it’s flying to get on top op the cube.

The scene consist of a cube and a ramp (long, flat cube). Both have the Layer Walkable and Height-Testing ist enabled for this layer.

The “flying” only appears on the side of the cube, where the ramp is located, which is kind of strange.

Hi

I’m not quite sure what you mean. Maybe you could upload a video/gif that shows this?

Hi

Could you post a screenshot of the graph in the scene view?

Well, that seemst to explain it. Strage, that this wasn’t shown as I encountered the problem.

Changing the Max CLimb did only altered the graph, but the unit still floats up the corner. Removing “Cut Corner” removed also some extra nodes but the porblem is still there, but “lower” It now only floats up the upper 1/4 of the ramp.
Also, How can I remove the extra path overlapping the objects?

  • The “new” version, as there is only one pic/post allowed:

Hi

It looks like either your colliders are much larger than the objects themselves or maybe you have enabled the “thick raycast” option. Try to disable that and see what difference that makes.

Thanks, that solved the coverlapping, but now it cuts the corners even more

Hi

You could try using an erosion value of 1 in the graph settings.
Ramps can be a bit tricky. You could also try to put invisible colliders on both sides of the ramp near the base to discourage it from cutting corners there.

Hm, that minimizes the problem but doesnt’s solve it completely. But I guess this is ok for a protoype.

Btw; Should I use multiple graphs, as every avoided object has the same distance/diameter