Uploaded September 2022 | Updated September 2026, 1 hour ago
Full Tutorial: youtu.be/6YsamZNNwpQ
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!
As always, all code from this video is available on GitHub: github.com/llamacademy/ai-series-part-41
๐Resources๐
โซ Projectile Motion Wikipedia (equations): en.wikipedia.org/wiki/Projectile_motion#Angle_%CE%B8_required_to_hit_coordinate_(x,_y)
โซ Kinematic Equations Source: physicsclassroom.com/class/1dkin/Lesson-6/Kinematic-Equations
โซ Projectile Trajectory Video: youtu.be/8mGZBYsSXcQ
๐ฑ Let's stay connected
YouTube: youtube.com/c/LlamAcademy
Patreon: patreon.com/llamacademy
Facebook: facebook.com/LlamAcademyOfficial
Twitter: twitter.com/TheLlamAcademy
TikTok: tiktok.com/@LlamAcademy
Instagram: instagram.com/LlamAcademy
----
Believe in LlamAcademy's mission and have received value from the videos? Consider becoming a Patreon supporter: patreon.com/llamacademy
----
Most tutorials come from knowledge gained making https://survival.llama.software Llama Survival - a top-down zombie survival shooter for Android and iOS.
I also have some Unity Assets (affiliate link): assetstore.unity.com/publishers/22409?_aid=1101l9QvC
#unitytutorial #tutorialtuesday #gamedev #tutorial #unity #llamacademy #gamedevelopment #ai #projectilemotion
Full Tutorial: youtu.be/6YsamZNNwpQ
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!
As always, all code from this video is available on GitHub: github.com/llamacademy/ai-series-part-41
๐Resources๐
โซ Projectile Motion Wikipedia (equations): en.wikipedia.org/wiki/Projectile_motion#Angle_%CE%B8_required_to_hit_coordinate_(x,_y)
โซ Kinematic Equations Source: physicsclassroom.com/class/1dkin/Lesson-6/Kinematic-Equations
โซ Projectile Trajectory Video: youtu.be/8mGZBYsSXcQ
๐ฑ Let's stay connected
YouTube: youtube.com/c/LlamAcademy
Patreon: patreon.com/llamacademy
Facebook: facebook.com/LlamAcademyOfficial
Twitter: twitter.com/TheLlamAcademy
TikTok: tiktok.com/@LlamAcademy
Instagram: instagram.com/LlamAcademy
----
Believe in LlamAcademy's mission and have received value from the videos? Consider becoming a Patreon supporter: patreon.com/llamacademy
----
Most tutorials come from knowledge gained making https://survival.llama.software Llama Survival - a top-down zombie survival shooter for Android and iOS.
I also have some Unity Assets (affiliate link): assetstore.unity.com/publishers/22409?_aid=1101l9QvC
#unitytutorial #tutorialtuesday #gamedev #tutorial #unity #llamacademy #gamedevelopment #ai #projectilemotion










