Smooth Pathing for a single character

  • A* version: [5.4.4]
  • Unity version: [6.2]

Sorry if it is something obvious, but i have tried many things and settings by now.

The player still feels very “clunky” i guess is a good word, i cant get its path smooth.

I tried the funnel modifier, simple smooth modifier, different settings.
ill include some screenshots in case it helps, any tips would be greatly appreciated!

and this is basically the code im using

    public static void MoveTo(Vector3 point)
    {
        if (ai == null || dst == null)
            return;

        if (!PlayerBrain.Instance.CanMove)
            return;

        // Reset velocity
        ai.Teleport(ai.position);

        // Update dynamic target position
        moveTarget.position = point;

        // Enable movement
        ai.isStopped = false;
        ai.simulateMovement = true;
        ai.canSearch = true;

        // Force path calc
        ai.SearchPath();

        PlayerBrain.Instance.ChangeState(PlayerState.Moving);
    }

Nevermind, someone told me to use Grid graph and i didnt bother looking into it.

Switched to Recast graph with RichAI and its perfect now.

1 Like