# RVO Local Avoidance and Navmeshes vs Scene Rotation

Hi,
I’ve been trying to use A* Pathfinding Project in a somewhat different scenario to the norm.
I’m working on a game where gravity is not always downwards. For example, a character could run around a planet, small sphere or around the inside of a tube.

This causes some difficulties with Navmeshes and with the local avoidance.

For now, my current solution is to generate my own point graph and treat it like a grid graph. I’d love to use navmeshes for this but I noticed that you can’t rotate your meshes (I guess unless they’re already rotated in a 3D program) (my mistake, you can rotate meshes) and you can’t rotate the Recast graph generator to generate graphs sideways for example.

Is this simply an oversight or is it a limitation of the design? Would I face problems if I went so far as to start creating rotated graphs manually?

With Local Avoidance, I noticed that if I skip the “adjust y position” code, it seems to work fine as long as you have a RigidBody + Collider on it.

Are there any other problems I’ll face with this approach? I imagine I’ll need to rely on radius and not height. I also imagine I’ll have problems with colliders.

Can you suggest any other approaches I could be taking?

Hi

The local avoidance will not work in 3D, it only works in 2.5D (for example a building with multiple floors). This is a pretty hard limitation of the system unfortunately.
It could be solved by, during the calculation step converting the coordinates of all other agents to the current agent’s local coordinate system before using local avoidance, but that might be tricky to do in a stable and fast way.

Some other type of local avoidance such as a force based approach (e.g UnitySteer) might work better since it is much easier to generalize to 3 dimensions.

Navmeshes can be rotated, but some direction needs to be up because there are lots of checks for things like “is this point inside that triangle” which have no real meaning if there is no well defined up direction, so making a navmesh covering a sphere for example wouldn’t work very well.

Thanks, I never thought about that for nav meshes. Sounds like the point graph is the way to go. Btw, I think the point graph is very versatile - really nice that you can use tags or a root node.

I’ll have a play around with the avoidance in that regard, otherwise I’ll check out unity steer.

Appreciate the quick response.