Simplest way to use external Controller?

I have a 3rd person controller, that just needs a moveDirection. I tried looking at the examples but can’t quite figure it out.

I want to have a character that can be driven either by PlayerInput, or by AI, so I just want to get the moveDirection from the Pathfinder, and pass it to my controller, as if it’s just another input src.

I’m using a RichAI w/ a Recast Graph.

I think what I want to do is

  • richAi.updatePositon=false, richAi.updateRotation=false,
  • get the moveDirection from richAi and pass it to my controller,
  • let the object move according to it’s own properties
  • sync the richAi’s position to my transform.position

Is this the right way to approach this? I’m a bit stuck at the last step… I tried a .Move() and .FinalizeMovement() and neither seemed to work. When using the latter I would get extremely choppy movement.

I currently have it working with the navigator doing the updating, and assigning the speed/acc values from my controller to RichAI, but I think it would be a little cleaner to work with if I could just have the controller do all the moving.


The RichAI script is built to move using a raw velocity. Can your controlled take a velocity as input?