Knockback NavMeshAgents using Physics | AI Series 51 | Unity Tutorial

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

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

  • @degiguess
    @degiguess 11 месяцев назад +2

    One thing that's worth noting if you feel like it would suit your project is that you can actually calculate a path on a navmesh without having to use a navmesh agent. In my project I got annoyed by the lack of physics on agents and ended up just making my own physics based agent. It's as simple as calculating a path, getting the next point in the path, applying a force to make my agent face it, then applying a forward force to push the agent along.

  • @tianbornman6115
    @tianbornman6115 10 месяцев назад +1

    Dude, legit exactly what i was looking for, i was tryna make this work for a while. TY!

  • @castlecodersltd
    @castlecodersltd 7 месяцев назад +1

    I've really enjoyed this series, thanks :-). It's answered some questions I've had, not just for AI.

  • @PRodi_
    @PRodi_ 11 месяцев назад +5

    Awesome tutorial, as always! Your dedication to these guides is truly inspiring.
    I have a quick suggestion about your closing intro line: while I appreciate the lighthearted spirit of "Who me, yes you," I find it a bit childish and annoying with this changing voice…
    Personally, I'm much more drawn to your empowering statement, "Here to help you make your Game Dev dreams become reality." It simply feels more mature and really resonates with me and feels perfectly consistent with your overall message.
    I wonder if it might be interesting to poll your viewers and see what they prefer?

    • @LlamAcademy
      @LlamAcademy  11 месяцев назад +1

      Thanks for the feedback. Do you dislike the entire "yes you" portion or do you feel I'm taking it a little over the top with the voice changing and all that around it?

    • @PRodi_
      @PRodi_ 11 месяцев назад +3

      @@LlamAcademy I personally find the "Who me, yes you" (only this 4 words) line a bit annoying and I'd really enjoy hearing your natural tone without the pitch shift. I think it would create a more natural and engaging connection with the audience.

    • @LlamAcademy
      @LlamAcademy  11 месяцев назад +1

      @@PRodi_ I appreciate that. I may have gotten a little carried away with that part and I agree it can feel like it cheapens the sincerity of the part that is meaningful.

    • @tianbornman6115
      @tianbornman6115 10 месяцев назад +1

      @PRodi_ What a blockhead statement to make bro, the mans made a good vid. Keep doing you @LlamAcademy man, great vid

  • @cosnow
    @cosnow 2 месяца назад +1

    Thank you very much!! This video really helped me.

  • @HouseTrapJay
    @HouseTrapJay 11 месяцев назад +2

    I built a physics-based knockback system on navmesh enemies very recently. Can't wait to see how you handle it to compare notes.
    Something tells me I'm gonna need to do some re-writes after I finish watching...

    • @LlamAcademy
      @LlamAcademy  11 месяцев назад +1

      😁 I'd love to hear about your implementation! I know some people will use the NavMesh and push back solely on the NavMesh. I found that more complex than this solution

  • @VioVanHelsing
    @VioVanHelsing 3 месяца назад +1

    Thanks, this was really helpful!

  • @brbdennis5317
    @brbdennis5317 11 месяцев назад +1

    Chris the legend! 😎

  • @TheArghnono
    @TheArghnono 11 месяцев назад +4

    How many knocks would an IKnockbackable knock back if an IKnockbackable could knock back?
    A great video tutorial! I had a similar problem a year or so ago and had no ends of pain since I didn't know Agent.Warp existed. RTFM, I know.

  • @breadman7733
    @breadman7733 11 месяцев назад

    Another amazing video. Thanks Liam !

  • @janowazir
    @janowazir 11 месяцев назад +1

    Thanks for making this video

    • @LlamAcademy
      @LlamAcademy  11 месяцев назад +1

      Welcome ☺

    • @janowazir
      @janowazir 11 месяцев назад

      @@LlamAcademy You also.

  • @oddlaceguy9697
    @oddlaceguy9697 11 месяцев назад +1

    Could you please make a video on the method of extracting the path and then setting the rigidbodies velocity toward the next path node?

    • @LlamAcademy
      @LlamAcademy  11 месяцев назад +2

      You can probably take the path calculation from here (really just NavMesh.CalculatePath)
      ruclips.net/video/scaBHHFKLL0/видео.html
      Then apply force to the rigid body in the direction of the next corner

  • @mohokhachai
    @mohokhachai 10 месяцев назад +1

    Thanks for the tutorial

  • @LowLevelLemmy
    @LowLevelLemmy 11 месяцев назад

    workout tutorial pls

    • @LlamAcademy
      @LlamAcademy  11 месяцев назад

      step 1: lift heavy thing
      step 2: get big 💪
      😜

  • @raztaz826
    @raztaz826 11 месяцев назад +1

    This is good, but I think it's a lot of work to work around the limitations of the built in Unity navmesh agents system. I prefer to use Aaron Granberg's A* implementation and have rigidbodies active all the time so that they can be knocked or pushed by anything at any time.

    • @LlamAcademy
      @LlamAcademy  11 месяцев назад

      That is a great system that does avoid a lot of the limitations of the built in navigation system.

  • @MrShadow274
    @MrShadow274 11 месяцев назад +1

    Nice tutorial and very useful to make you game feel less static! I have a question: how can you get nav agent back on NavMesh if its gets knocked out of it? I have AI npc's that use character controller to move, but sometimes if they run too fast or get knocked they get off nav mesh and get stuck. If i just do Warp to closest nav mesh point it wont fix the problem since i need to move the whole character back to navmesh again. Maybe you have some good solution for this? Thanks!

    • @LlamAcademy
      @LlamAcademy  11 месяцев назад +2

      Warping is the only built in method of getting the agent “back on the navmesh”. Remember the navmesh is the representation of walkable (or otherwise traversable) areas of the AI. If they’re off this then something really bad happened. Perhaps in the closing segment of this video those ideas could help.
      Depending on how “off” they are and how your scene is configured, you may be able to just lerp or move them back following a curve, then warp them to that position.

  • @bonse2000
    @bonse2000 11 месяцев назад +1

    can you make a tutorial about the outlines in our game?

    • @LlamAcademy
      @LlamAcademy  11 месяцев назад

      I'm actually using www.youtube.com/@danielilett 's method for outlines I learned about it here: ruclips.net/video/VGEz8oKyMpY/видео.htmlsi=IlmsCu8-hiJR8kMh

  • @brodakarat6340
    @brodakarat6340 11 месяцев назад

    I'm meeting an issue right now as I've just discovered unity organisations and ready to make my first whole game. I'm scared about the legal rules around purchased assets when working in a team thru unity plastic scm. It would be great to have a video describing things like seats and how to "do it right" when using outsourced assets in a publicly released game

  • @cengizgorencom4251
    @cengizgorencom4251 11 месяцев назад +1

    very cool dude..

  • @flying.volcano.studio7727
    @flying.volcano.studio7727 11 месяцев назад

    Good day Liam, i hope u are doing well. how to make cinematic introduction scenes like short movie clip for game. whats the best way?

    • @LlamAcademy
      @LlamAcademy  11 месяцев назад

      I think the "Timeline" package is what you're looking for

  • @hatahnicolas5861
    @hatahnicolas5861 Месяц назад

    Do you have a tutorial for this shader sir?

    • @LlamAcademy
      @LlamAcademy  Месяц назад

      I don’t, but the shader graphs are included in the repo. There’s 2 needed for the effect: a full screen outline shader (set up on URP asset) and a toon shader (on the material for each object) to get this look.

  • @JuanRobertoMárquez
    @JuanRobertoMárquez 6 месяцев назад

    why not just change agent velocity to the force direction?

    • @LlamAcademy
      @LlamAcademy  6 месяцев назад +1

      That can work for some game styles. However, the agent will still be stuck to the NavMesh. For a lot of game styles that will not look very good