Download

RVOAvoidance Specific Actors

Hi!

I wrote a Vehicle AI System which enables vehicles to travel along certain routes, stop at traffic lights etc. But, at certain crowded points my system screws up. So I want to enable RVOAvoidance at certain points and make them avoid only specific actors, i.e. other vehicles (not landscape). How do I setup this scenario?

Thanks.

RVO avoidance isn’t too difficult to program in yourself so you could just manually set it up. It’s based on proximity to other objects and I don’t think there’s any way you can filter what those are with the current implementation (which is designed to work with the character movement component only).

In short, all it does is modify the velocity vector of the object so that it ‘follows’ the new direction. You can just trace out in front of the unit, work out if you hit anything and modify the velocity if you do. Of course, this only works if your vehicle automatically orientates itself towards the direction it’s moving in - like characters do. Using BP you should then be able to turn that behavior on or off whenever you like, and filter the trace to certain actors.

RVOAvoidance works with WheeledVehicleMovementComponent and it adjusts both the steering and the throttle. The point is that the vehicle automatically avoids landscape or any other static mesh actors and deviates from its route which is bad from my system. What I want to do is filter out vehicles only. Thanks.

I fixed with custom avoidance by simple box trace.

Seems like the custom way is probably the best bet for this at the moment since the navmesh RVO avoidance doesn’t really take into account acceleration and turning circle etc with cars so tapping into your own nav is probably the best bet

It does? Bloody hell… that’s good news to me

Ah did not see that 1 either! that definitely does make it better, I hadn’t tried it on a wheeled vehicle before