Easy movement system using NavMesh in Unity

Поделиться
HTML-код
  • Опубликовано: 28 дек 2024

Комментарии • 18

  • @ealvarado8
    @ealvarado8 2 года назад +5

    Hey man, great video! I just have a suggestion for anyone who's watching this tutorial. If you want a smoother rotation when your player is moving, add the rotation method before setting the navmesh agent destination.
    Something like this:
    var destination = playerTransform.position + playerTransform.forward * input.y + playerTransform.right * input.x;
    Rotate(input);
    navMeshAgent.destination = destination;

  • @yaayeit9286
    @yaayeit9286 Год назад +1

    Amazing video!

  • @TeamTechShock
    @TeamTechShock 3 года назад +1

    Thanks man, I was trying to figure this out for hours.

  • @avyaprashantkachhwaha5471
    @avyaprashantkachhwaha5471 Год назад +1

    How can I apply this on a navmesh with several off-mesh links?

    • @SunnyValleyStudio
      @SunnyValleyStudio  Год назад

      I'm quite sure that you can trigger the off-mesh link automatically and disable the player input (or just trigger the jump on player pressing spacebar). When you land all you need to do is reenable player direct input control. I think you need to add a custom scrpt anyho to the off-mesh links so that you can trigger an animation or any custom code of yours no?

  • @harharrr9810
    @harharrr9810 2 года назад +1

    how to import this into unitty the files downloaded cannot be added to an unity

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 года назад

      You can use this setup with any assets that you want. You don't have to use Kaykit. I am sure there are some great tutorials about importing 3d models to unity on YT 😉

  • @blabla-h6r
    @blabla-h6r 2 года назад +1

    thanks but how to make it jump using space bar to ?

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 года назад +1

      You can place off-mesh links on the navmesh and have character jum them automatically but for the most part navmesh is not the solution if you desire more arcadish styled controls (check out character controller for that) . docs.unity3d.com/Manual/nav-BuildingOffMeshLinksAutomatically.html

    • @blabla-h6r
      @blabla-h6r 2 года назад

      @@SunnyValleyStudio thanks for replaying

  • @harharrr9810
    @harharrr9810 2 года назад +1

    Want to know more abt the door

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 года назад

      Thanks for the feedback! I will make an additional vid about those :)

    • @mnrs2562
      @mnrs2562 2 года назад

      @@SunnyValleyStudio Make 3D RPG if it's possible, ty!

  • @redinternet9893
    @redinternet9893 2 года назад

    It it easy to do knockback in combat with nav mesh