Forum rules - please read before posting.

Player slides after reaching marker if playing custom animation

When i interact with a hotspot i am running an action script that does the following:

  • Character/Move to point (wait until finish);
  • Character / Animate (play custom);

The expected behaviour is:

  • Character reaches specified marker;
  • When finished, character should play custom animation;

What actually happens:

  • Character moves towards marker;
  • At a certain distance, character play custom animation;
  • Character keeps moving towards marker (sliding) to eventually stop;

Navmesh stopping distance is set to 0.

The issue only occurs when trying to play a custom animation after the player reaches the marker.
If the actions script only instruct the player to reach the target, then the player will stop exactly over the marker.

Any thoughts?



  • edited December 2019

    What are your AC and Unity versions, and is this a 2D or a 3D game?

    What do you mean by "Navmesh stopping distance"? Is this from a NavMeshAgent component attached to the character? If so, do you have the NavMeshAgentIntegration component attached?

    What of your Settings Manager's Destination accuracy slider? The accuracy may need to be raised if you've reduced the Agent's stopping distance to zero.

    Does your Player rely on Root Motion, or a Rigidbody, for movement?

    Please share screens of your Player's Inspector, the Settings Manager, and the scene itself so we can understand the exact situation.

  • edited December 2019

    Hello Chris,
    Thanks for your answer.

    • I am using AC 1.67.5 on Unity 2018.4.f1;
    • It's a point and click 3d game using 2d characters (sprites);
    • I meant Nav Mesh Agent stopping distance (set to 0);
    • Yes i do have the NavMeshAgentIntegration attached;
    • Increasing the Destination Accuracy made it better but still slides;
    • My player relies on RigidBody for movement;
    • The scene is using Unity Navigation as Pathfinding method;

    What i don't understand is why the player starts playing the custom animation before reaching the spot if i have selected "wait until finish".

    Even adding a Character / Move Along Path / Stop Character won't help.

    Action script:

    Movement settings:


    Hope this helps and sorry for not sharing all these details in my original message.

  • edited December 2019

    I can't recreate this to any noticeable degree. Exactly how far away from the Marker does the Player start animating prematurely?

    Your AC version is quite old. Even if it's just in a test duplicate project, please upgrade to the latest release and try there.

    Precision movement is a complex topic, but the Manual chapter of the same name covers the basics. However, part of AC's internal workings when you rely instead on a NavMeshAgent for movement. Try unchecking Attempt to be super-accurate?.

    It may be that this creates a conflict - do things work more correctly if you remove both the NavMeshAgent and NavMeshAgentIntegration components?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.