Hi
This is working as designed. The relevant function is JobControl.ClampToNavmesh
.
I have done this because this typically happens when an agent has fallen off the world or some other strange thing.
For this use case, I would actually recommend that you set ai.updatePosition = false; ai.updateRotation = false;
and then every frame you can get the agent’s internal position and rotation and modify it based on boyancy and maybe even rotate the ship to follow the waves:
void LateUpdate () {
transform.position = ai.position + boyancyDelta;
transform.rotation = ai.rotation; // Optionally modify rotation too
}