Adjusting FollowerEntity Rotation(X,Z) While Traversing OffMeshLink Without Aborting Coroutine

Hi

This is a limitation right now. I’m considering changing those components to IEnableableComponent, so that they can be toggled like this.

As a workaround, you could do the rotation itself in the Update method:

IEnumerable IOffMeshLinkStateMachine.OnTraverseOffMeshLink (AgentOffMeshLinkTraversalContext ctx) {
    rotateAgent = true;
    // ...
}

void Update () {
    if (rotateAgent) {
         // ...
         ai.updateRotation = false;
         ai.rotation = ...;
    }
}
1 Like