Giter Site home page Giter Site logo

llamacademy / knockback-navmeshagent Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 1.0 204.58 MB

Learn how to knock back NavMeshAgents using Physics & Forces

Home Page: https://www.youtube.com/watch?v=0NH5obeOb7I&list=PLllNmP7eq6TSkwDN8OO0E8S6CWybSE_xC&index=52

License: MIT License

C# 53.80% ShaderLab 40.79% HLSL 5.41%
ai game-development gamedev gamedevelopment navmeshagent physics rigidbody tutorial tutorial-code unity

knockback-navmeshagent's Introduction

Knockback NavMesh Agents (AI Series 51)

In this tutorial repository and accompanying video you will learn how to knock back NavMeshAgents using Physics & Forces!

Youtube Tutorial

Quickstart

This repo uses the Scriptable Object Gun System as of branch part-14 to handle shooting. This was then modified to add knockback. There's nothing specific to this system required to make the knockback effect work. It just was a launching point to allow this to focus on the knockback instead of implementing a bunch of systems from scratch.

  1. Import Unity Particle Pack (free)
  2. Click play!

Everything should be working from there.

Key Classes

While I highly recommend you check out the video for a complete understanding, I also understand that's not everybody's cup-of-tea. Here are the key classes if you just want to explore:

  1. IKnockbackable.cs - Interface to allow arbitrary objects to be knocked back
  2. EnemyMovement.cs - Implements IKnockbackable to handle how to get knocked back.
  3. KnockbackOnCollision.cs - Applies force to IKnockbackables OnCollisionEnter
  4. GunScriptableObject.cs - Applies force to IKnockbackables when bullets make impact
  5. KnockbackConfigScriptableObject.cs - Houses the configuration for the knockback effect as well as calculating the

Sponsors

This tutorial is Sponsored by Southern New Hampshire University. If you're interested in leveling up your gamedev skillset, consider getting an affordable, accredited degree in Computer Science or Game Design & Development from SNHU. You can go to https://snhu.edu/llamacademy to see what the current average annual salary for a game developer programmer is and learn how you can get started!

Supporters

Have you been getting value out of these tutorials? Do you believe in LlamAcademy's mission of helping everyone make their game dev dream become a reality? Consider becoming a Patreon supporter and get your name added to this list, as well as other cool perks. Head over to the LlamAcademy Patreon Page, join as a YouTube Member, or even become a GitHub Sponsor to show your support.

Phenomenal Supporter Tier

  • YOUR NAME HERE!

Tremendous Supporter Tier

  • YOUR NAME HERE!

Awesome Supporter Tier

  • Ivan
  • Reulan
  • Iffy Obelus
  • Perry
  • Mustafa
  • YOUR NAME HERE!

Supporters

  • Trey Briggs
  • Matt Sponholz
  • Dr Bash
  • Tarik
  • Sean
  • Elijah Singer
  • Bruno Bozic
  • Josh Meyer
  • Ewald Schulte
  • Andrew Allbright
  • AudemKay x2
  • Claduiu Barsan-Pipu
  • Ben
  • Christian Van Sttenwijk
  • Joseph Janosko
  • Chimera Dev
  • Wendy Whitner
  • Lukas Wolfe
  • YOUR NAME HERE!

Other Projects

Interested in other Topics in Unity?

Requirements

  • Requires Unity 2022.3 LTS or higher.
  • Universal Render Pipeline
  • Unity Particle Pack

Disclaimers

Some links in this readme may contain affiliate links which, at the time of purchase, at no additional cost to you, gives me a small portion of the purchase.

knockback-navmeshagent's People

Contributors

llamacademy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

luoyikun

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.