Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Bug Navmesh AI collision with player causes strange speed effect

Discussion in 'Navigation' started by Rin-Dev, Jan 8, 2023.

  1. Rin-Dev

    Rin-Dev

    Joined:
    Jun 24, 2014
    Posts:
    548
    So I'm a little lost as to whats causing this and hoping to get a little insight.

    I have my player character that uses the CharacterController component for movement.
    I have some enemies set up with a capsule collider and navmesh agent.

    While the player collides with the AI while its following the player, it'll cause to the player to shoot past them at an abnormally fast speed. This is only when both player and AI are moving.



    I'm using
    _navAgent.destination
    and
    _characterController.Move()
    for the AI and Player respectively.

    I know about
    OnControllerColliderHit
    but I'm not sure if that would even work here or what I would check for to stop this random burst of speed.