How to avoid RVO agents with high speed passing through Obstacles?

OK, I’ve been working on a 2D-TowerDefence style project, in which monsters coming from all directions are RVO agents, and there is a character that player can move, it is also a RVO agents. And this moving character is not allowed to move out of the screen.

In the beginning I did not add any obstacle, I just clamped the destination of the moving character in the screen. Then I found when I control the character moving along the screen edge, it might go out of screen if some monsters happened to appear in front of it.

I thing it is because I only set the destination, but the moving process is controlled by RVO simulator, so I add four obstacle of line shape.

Now the question is, it works well under normal game speed, even 4 times game speed, but when it comes to 8 times speed, the character will pass through the obstacle.

Is there any way to handle this case? Any help would be greatly appreciated.

Hi

This can really only be solved by using sub-stepping: simulating the agents multiple times per frame.

This is only implemented out of the box in the beta version for the FollowerEntity movement script (which only works for recast/navmesh graphs at the moment).

Implementing it yourself requires some source code changes, I’m afraid.