Hello. Im looking to get functionality similar to Unity’s NavMeshAgent.Move();.
I want to move agent manually through input but im unable to keep the agent clamped to the graph.
I am using RichAI as my agent and graph is RecastGraph.
Here is the code i am currently using, it works fine moving but it doesnt get constrained.
public void Move()
{
agent.canMove = false;
Vector3 nextPosition;
Quaternion nextRotation;
agent.MovementUpdate(Time.deltaTime, out nextPosition, out nextRotation);
nextPosition = agent.position + movementVector.value; // movementVector is value from input.
agent.FinalizeMovement(nextPosition, nextRotation);
}