Projectile Trajectory Predictor - Unity Physics & Coding Tutorial

preview_player
Показать описание
Video Content
----------------------------------
0:00 - Intro
0:19 - Explanation
1:28 - Bounces, complexity
1:53 - Scene Setup
2:11 - Input handling
3:17 - Code
5:53 - Settings
6:45 - Firing Input
7:34 - Hit marker
8:17 - Last touches, outro
-----------------------------------

Here is a project focused on predicting trajectories for projectiles, thrown object and such.
It's nothing too fancy but a must-have for any project that requires such tools!

Download the project here:

Further reading for more advanced physics simulations and for predicting multiple bounces:

#coding #csharp #gamedev #trajectory #unity
Рекомендации по теме
Комментарии
Автор

YOU ARE A LIFE SAVER! I am an indie VR developer and needed to make this exact mechanic for my game. The code was super easy to adapt to VR and I can't thank you enough. I have subscribed.

johnraygames
Автор

Short and sweet. I liked and subscribed

henryqng
Автор

Best visual explanation i've ever seen. Keep up the great work💯

jakobanzengruber
Автор

Very useful tutorial! Helped me out lot.

simon
Автор

There is something wrong with CalculateNewVelocity() method because *= Mathf(1f - drag * increment) cause velocity to be 0f in cases where object have drag > 1 / increment

tonymax
Автор

Hey dude! Where did u place the struct component called ProjectileProperties? How did you use it? Like, did you place it inside another script or did you create a script just for that? Great video btw

akop
Автор

hii i downloaded your project it is succesffuly import in unity but when i fire balls are not going to designated area how i fix this pls tell me asap

MandeepSingh-xnvb
Автор

Hi, Ive just come across your channel. Ive Subbed and hope to see more content !!

random_precision_software
Автор

Very interesting and useful, thanks for your effort

spruslaks
Автор

Hello, how would you be able to add a height variable like the one in your archer video to the prediction curve in this exact setup?

CodingWithUnity-kq
Автор

Nice informative video. I happened across this while trying to look for something to help with having an enemy/npc attacking with a bow and calculating angle and power needed to get it to a destination. I'm not sure if I can reverse engineer your code to get something similar or if maybe you have some advice?

gwm
Автор

How would you go about, doing something like an arrow so it rotates along the path

lilbabyPF
Автор

vector 3 Velocity= projectile.direction ....what formula is that ?

muhammadumair-qlsm
Автор

how can i change the value to z, because i try to use vector3 but its error missing reference

shidou
Автор

One of those tutorials where the maker is trying to look cool instead of making a tutorial. Don't Bother

joshuanyamori
Автор

Good code, but bad video. I managed to understand the algorithm only after opening the source. If only the video has shown more than two lines at a single time, so that I could get the bigger picture.

BEATER
Автор

Guau!, okey, good, I going to applied it into Stride Engine. Already I applied a RayToOrigin(), the next is this.

diegohiroshiysusvideos
Автор

It is the worst and most complicated tutorial on

mhf
Автор

you should shown the actual scripts to understand it more rather than doing like this and talking about it and confuse us. 😔👎

LION
visit shbcf.ru