RVO for 2D

I see, that local avoidance do not work in XY plane. Is there a workaround (or tutorial) or plan to implement this feature in the near future?

Hi

The local avoidance core system is completely separate from the Unity stuff (like transforms and GameObject’s), so the only thing which actually assumes the XZ plane is the RVOController. There is no out of the box solution, but I think it should be relatively easy to modify it slightly so that instead of using the X and Z coordinates which it passes to the Agent, you use the X and Y coordinates. So for example in the Move function you would set the desired velocity to
desiredVelocity = new Vector3 (vel.x, 0, vel.y);
to trick the internal scripts that the Y coordinate is actually the Z coordinate.

Thanks for the answer. First it looked simple, but I see, that RVOController is much similar to default unity character controller. So there are more dependencies, not just Move function. Looks like, I need to develop my own controller for 2D…

Did you get anywhere with this as I am currently wanting to use this for 2d?

Nope, sorry, not yet. Maybe somebody else?

Local avoidance seems to depend on rotating the objct. If you do not allow rotation one object just pushed the other. In 2D depending how you do it you often do not use rotation, I know I don’t. For 8 direction movement we have 8 animations. in orer to get this to work you would have to not only change the 3D stuff to 2D but also take the rotation and probably turn it into a vector. After all that who knows. For my 2D game so far I have a 2D char controller based on the prime31 2D controller. We use rays.

Hi there, I just bought the plugin having used the free version (and loved it).

I bought it specifically to take advantage of local avoidance. I could implement my own but I am really after time savers on this project… any chance there is an RVO Controller that works for XY?

Any news on this? I mean its kind of a big bummer that we cant use avoidance for 2D games…

Hi

This is a pretty old thread, but I figured I can post anyway.
See RVO Beta Version
This is implemented in the latest beta. It is not very well tested at the moment, and obstacles are not implemented for 2D yet, but I expect to implement those soon.