Show Any Projectiles Trajectory in Unity with Simple Math & a Line Renderer #shorts @LlamAcademy
Show Any Projectiles Trajectory in Unity with Simple Math & a Line Renderer #shorts  @LlamAcademy
Uploaded July 2022 | Updated September 2026, 24 minutes ago
Full Tutorial on YouTube: youtu.be/8mGZBYsSXcQ

Need to show the path of a projectile? Not paying attention in Physics catching up to you? No problem! Learn how to draw the trajectory of a projectile would take using a LineRenderer and one of those pesky physics formulas you said you'd never use again! Show a visualization of where those objects will go!

We're using a grenade in this case, but it can be applied to cannon balls, bullets affected by gravity, throwing a banana, or any other projectile!

If you're checking out the GitHub Repository below, make sure to get the Unity Particle Pack and head over to Mixamo and pick up the "Throw Object" animation (tip: trim it down to skip the pick-up section) and add it to the Animator with an upper body avatar mask.

As always, all code from this video is available on GitHub: github.com/llamacademy/projectile-trajectory

πŸ“± 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

00:45 Scene Overview
01:51 Show Visualization in GrenadeThrower.cs (with math explanations)
06:07 Hooking up references in the editor
06:47 Demo 1 - See the need for Raycasting
07:51 Prevent Line From Going Through Walls in GrenadeThrower.cs
10:10 Demo 2 & Closing
Show Any Projectiles Trajectory in Unity with Simple Math & a Line Renderer #shortsHow to Make (and USE) Templates in Modern UI ToolkitDeal Damage to Enemies and Objects with Guns! Gun Series 3 | Unity Tutorial #shortsAnimation-driven Reloading | Gun Series 4 | Unity TutorialSwap Your Games Content WITHOUT Rebuilding the PlayerControl Flow Nodes in Unity Behavior | Unity TutorialIm hosting a Unity Navigation Livestream! #gamedev #unityScene Transition Animation Framework | Unity TutorialGun Sound Effects with an Audio Config ScriptableObject | Gun Series 5 | Unity Tutorial #shortsCross-Platform IAP Store Page with Unity IAP in 2023 | Unity TutorialURP Shader Graph Basics - Scrolling UV | Unity TutorialEasy Minimap using UI Toolkit | Unity Tutorial
LlamAcademy |

Show Any Projectile's Trajectory in Unity with Simple Math & a Line Renderer #shorts

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER