How to make RichAI stick to Recast graph?

Hello,
I have problem with RichAI - I want to use no gravity and force my agent to stick to recast graph (I mean for example if I have recast graph “in air” I want my agent to go in air). Is there buid in solution for this kind of behaviour?

Hi

Normally the physics engine is used for this instead. Is there a reason you cannot use that (e.g. use invisible colliders)?

You could use this however

NNConstraint nn = new NNConstraint();
nn.distanceXZ = true;
var nearest = AstarPath.active.GetNearest(ai.position, nn).position;
ai.position = nearest;

I need to separate physics from character movement in some cases (due to few things, level design for example). Your solution sounds reasonable, I’ve hope that it will have good performance (I don’t have many units, 20-30 max).