RichAI + Recast Graph falls though terrain

If you have a very high time scale you can do something like this to make it run multiple movement calculations per frame.

IAstarAI ai;
public void Awake () {
	ai = GetComponent<IAstarAI>();
}

public void Update () {
	// Make the AI not do any movement by itself
	ai.canMove = false;
	// Run the movement code multiple times per frame
	int timeMultiplier = Mathf.Round(Time.timeScale);
	for (int i = 0; i < timeMultiplier; i++) {
		Vector3 nextPosition;
		Quaternion nextRotation;
		ai.MovementUpdate(Time.deltaTime / timeMultiplier, out nextPosition, out nextRotation);
		ai.FinalizeMovement(nextPosition, nextRotation);
	}
}

This may not work that well with local avoidance though, as that still runs at the same frame rate.

See also these topics: