Can't quite get it right (simple smooth, thick 2D raycast, rvo)


This image shows my problem. As you can see, I’m using an rvo assisted path which I’d like to use a simple smooth and a thick 2d raycast model.

I’ve drawn in red ink (thanks again snipping tool!) the kind of thickness I’d like to have, and what a typical ideal path might look like. As you can tell, this ideal path (in red) is quite different from the calculated path (in green) which tends to very tightly hug the walls.

Obviously this tight hugging of the walls is bad for gameplay. It creates all kinds of problems!

Maybe I’m not using the thick raycast properly?

I tried using the radius offset tool, but it produced really, REALLY bad results. My little guys would clip through the walls, forced off the grid, etc. Maybe this modifier is broken or not supported in 2D? Or maybe I’m not using it properly?

Really, any help at all would be appreciated!

one way to keep it from hugging the walls is to put penalty tags on the tiles near obstacles, here’s a topic where I put my implementation for wall distance penalties:

This seems like it’s working fairly well.

I think I’ll now need to fine-tune the modifiers, RVO, and seeker penalties, but I think this will work.

Thanks :slight_smile:

2 Likes