Margin for paths calculated from a 2D Navigation polygon

DSparilDSparil Posts: 1Member

Hi all,

I started to develop in Godot and I'm really liking it :) But questions are coming to my mind and now I have one. Sorry if something like this has been answered, but I am not able to find one by searching, maybe wrong keywords...

Imagine the scenario where you have a navigation area with a vehicle that has to take a ride to a desired point, obviously taking care of the non-navigable/obstacle areas.

The calculated path slashes the non navigable areas, and according to the documentation and the nature of the Navigation node, I don't see a high level way to stablish a clearance area with the size of the sprite to move width.

So the questio
n is clear: Is there a way to stablish something like that: Let's include an image that shows the problem:

Thanks in advance!

Answers

  • RossRoss Posts: 194Member

    I found if I used get_simple_path() with optimize = false it padded out the corners like you are saying. Though I had no control over how much, and there's no documentation on it.

  • vinod777vinod777 Posts: 9Member

    May be do something like take all points, cast some rays around and move the point away from the collision.. I am not exactly sure. :)

Sign In or Register to comment.