Skip to content

llamacademy/ai-series-part-41

Repository files navigation

Accurate Projectile-Throwing AI (including movement prediction)

In this Unity tutorial, learn how to make your AI throw accurate projectiles at stationary targets given only a maximum allowable throw velocity. You can also learn how to make the AI be pretty dang good at predicting where the player will be and hitting them while they are moving, still with only a maximum allowable throw velocity. No hard coded heights, just accurate throws!

I spend a lot of the video covering how the math works out so you can understand the process we follow to get to this result, as well as covering the equations we're using so you can take this implementation and enhance it to further suit your game's needs. Of course, if this is "good enough" for you, feel free to take it off the shelf. If you're looking for even more accurate predictions or throwing over/under obstacles, don't worry! I also cover what else you need to do to take those use cases into consideration!

Youtube Tutorial

Patreon 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 https://patreon.com/llamacademy to show your support.

Phenomenal Supporter Tier

  • Andrew Bowen
  • YOUR NAME HERE!

Tremendous Supporter Tier

  • YOUR NAME HERE!

Awesome Supporter Tier

  • Gerald Anderson
  • AudemKay
  • Matt Parkin
  • Ivan
  • Paul Berry
  • Reulan
  • YOUR NAME HERE!

Supporters

  • Bastian
  • Trey Briggs
  • Matt Sponholz
  • Dr Bash
  • YOUR NAME HERE!

Other Projects

Interested in other AI Topics in Unity, or other tutorials on Unity in general?

Socials

Requirements

About

In this Unity tutorial, learn how to make your AI throw accurate projectiles at stationary or moving targets given only a maximum allowable throw

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project