Make (Mostly) Accurate Projectile Throwing AI at Moving Targets | Unity Tutorial #Shorts @LlamAcademy
Make (Mostly) Accurate Projectile Throwing AI at Moving Targets | Unity Tutorial #Shorts  @LlamAcademy
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
Make (Mostly) Accurate Projectile Throwing AI at Moving Targets | Unity Tutorial #Shorts8 Inverse Kinematics Solutions in Unity Evaluated - Which should you use?Enemy State Machine AI FULL IMPLEMENTATION | AI Series 47 | Unity TutorialAnimation-driven Reloading | Gun Series 4 | Unity Tutorial #shortsDoes Animation Rigging Work on Generic (non-Humanoid) Models? | Unity TutorialTop 3 Lessons (Re)Learned from Making My Chicken Defense MicrogameHow to Retarget Animations with Inverse Kinematics & Animation Rigging | Unity TutorialCompositional Relationships - Youve Already Been Using Them | Unity C# Basics 7 | Unity TutorialJust another day using VSCode to write basic C# code...Visualize Raycasts, Paths, and More in the Scene View with Editor Scripting | Unity Tutorial #shortsRuntime NavMesh Updates in Performance Critical Contexts | Unity TutorialScriptableObjects, Explained #Shorts
LlamAcademy |

Make (Mostly) Accurate Projectile Throwing AI at Moving Targets | Unity Tutorial #Shorts

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER