Build custom Navi Agent

I’ve got a question regarding Unity 3.5. I’ve downloaded the 3.5 pro trial with its new pathfinding capabilities. By now I’ve created a nav mesh that looks pretty good. The default navigation agent however presumably does not fit my needs.

What I need is an agent that is capable of controlling two wheels by setting their power to values between -1 and 1. The object it’s about to control is a simple cube mesh with a rigid body. A simulated “motor controller” basically adds a force at two points where the two wheels are supposed to be.

It’s a bit tricky to explain. Imagine a cubical robot with two wheels. The nav agent should be able to move that robot across a given completely flat playing field with some static obstacles (also dynamic ones later on; an opposing robot that must not be hit in any way) by only using these two wheels for rotation and translation.

Furthermore the nav agent should be just one of a certain count of controlling sources. For example another controlling source might be the user himself. Or another script that tells the robot to sequentially move some cm forward, turn to a given angle move some cm backward and stop.

Well, to cut that story a little shorter… is it possible to create a custom navigation agent that is capable of doing this? And if it is, how is it done ?

Thanks a lot!

You can probably use the navmesh just to CalculatePath between the robot and a destination, and then move it along the path yourself, with the methods you mentioned.

@asafsitner
Thanks a lot! You really helped me out.