Projectile Trajectory Predictor - Unity Physics & Coding Tutorial

  Рет қаралды 33,559

ForlornU

ForlornU

Күн бұрын

Пікірлер: 43
@ForlornU
@ForlornU 11 ай бұрын
I made a follow up video on this where we calculate a trajectory between two points, the force and velocity needed to get from one to the other, it's similar but more geared towards something AI controlled, It's the Advanced Targeting part that you want to look out for kzbin.info/www/bejne/kKO9iniCadypodE
@joshuanyamori
@joshuanyamori 2 ай бұрын
One of those tutorials where the maker is trying to look cool instead of making a tutorial. Don't Bother
@mhf169
@mhf169 2 ай бұрын
It is the worst and most complicated tutorial on earth!!!!!
@akop1194
@akop1194 5 ай бұрын
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
@8BEATER1
@8BEATER1 Ай бұрын
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.
@ForlornU
@ForlornU 17 күн бұрын
I will keep this in mind for future videos, thank you
@henryqng
@henryqng Жыл бұрын
Short and sweet. I liked and subscribed
@johnraygames3106
@johnraygames3106 Жыл бұрын
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.
@ForlornU
@ForlornU Жыл бұрын
Happy to help! Best of luck on your project!
@CodingWithUnity-k3q
@CodingWithUnity-k3q 3 ай бұрын
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?
@Unity_Tutorial_Games
@Unity_Tutorial_Games Жыл бұрын
good
@jakobanzengruber8688
@jakobanzengruber8688 Жыл бұрын
Best visual explanation i've ever seen. Keep up the great work💯
@ForlornU
@ForlornU Жыл бұрын
Thanks, will do!
@gwm249
@gwm249 Жыл бұрын
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?
@ForlornU
@ForlornU Жыл бұрын
I believe that would require an entirely different set of calculations and it would probably be easier to start from scratch. I found this thread about it if that's helpful, otherwise it's not something I can answer at this time. You have given me an idea for a future video tho, thank you :) Trajectory Formula - discussions.unity.com/t/trajectory-of-a-projectile-formula-does-anyone-know-maths/15628/5
@gwm249
@gwm249 Жыл бұрын
@ForlornU Thanks, I appreciate the help :) I'll look forward to that one. I just started this game dev thing (at 42, but I guess you're never too old to learn something new) so anything is useful.
@kptmaci4979
@kptmaci4979 11 ай бұрын
@@ForlornU Im looking for the same thing. I dont think anyone found easy solution for this and many people are asking this online. No easy code to adapt, so that video would be highly appreciated!
@ForlornU
@ForlornU 11 ай бұрын
I did get around to making that video, I hope it helps! It's the Advanced Targeting part that you want to look out for kzbin.info/www/bejne/kKO9iniCadypodE
@simon5986
@simon5986 5 ай бұрын
Very useful tutorial! Helped me out lot.
@muhammadumair-ql5sm
@muhammadumair-ql5sm Жыл бұрын
vector 3 Velocity= Projectile.initialSpeed/projectile.mass* projectile.direction ....what formula is that ?
@ForlornU
@ForlornU Жыл бұрын
It's not really a formula. Velocity is a direction and a speed: initialSpeed*direction, however to calculate for the objects mass i divide the speed with the mass, mass acting as a multiplier usually between 0 - 1.
@__Rizzler__
@__Rizzler__ Жыл бұрын
man i hate tuples
@ForlornU
@ForlornU Жыл бұрын
Sorry about that! 😂 Seemed like a fun idea at the time
@castlecodersltd
@castlecodersltd 11 ай бұрын
Very good, thanks for sharing ☺
@random_precision_software
@random_precision_software 11 ай бұрын
Hi , Ive just come across your channel. Ive Subbed and hope to see more content !!
@ForlornU
@ForlornU 11 ай бұрын
Appreciate the support! More content will come 👍
@spruslaks26
@spruslaks26 Жыл бұрын
Very interesting and useful, thanks for your effort
@shidou2380
@shidou2380 Жыл бұрын
how can i change the value to z, because i try to use vector3 but its error missing reference
@ForlornU
@ForlornU Жыл бұрын
I'm not sure I understand your question, which value? What reference is missing? You can contact me on either Discord or Reddit, search for user ForlornU and dm me a screenshot and/or a pastebin with code. I want to help but need more information
@Notllamalord
@Notllamalord Жыл бұрын
That’s actually really cool
@lilbaby4PF
@lilbaby4PF 11 ай бұрын
How would you go about, doing something like an arrow so it rotates along the path
@ForlornU
@ForlornU 11 ай бұрын
In my other video on trajectories I have arrows rotating along their velocity, it's a simple shorts script - kzbin.info/www/bejne/kKO9iniCadypodE
@lilbaby4PF
@lilbaby4PF 11 ай бұрын
@@ForlornU Thanks wasn't familiar with rotating along velocity, experimented and it works fine. Was incrementally rotating along line path which was less efficient
@ForlornU
@ForlornU 11 ай бұрын
@@lilbaby4PF glad to help!
@TheAstrocricket
@TheAstrocricket Жыл бұрын
bro this is so underated
@diegohiroshiysusvideos2909
@diegohiroshiysusvideos2909 Жыл бұрын
Guau!, okey, good, I going to applied it into Stride Engine. Already I applied a RayToOrigin(), the next is this.
@ForlornU
@ForlornU Жыл бұрын
Best of luck!
@TheLazyJAK
@TheLazyJAK 11 ай бұрын
Would love to see this but in Godot!
@LION303200
@LION303200 7 ай бұрын
you should shown the actual scripts to understand it more rather than doing like this and talking about it and confuse us. 😔👎
@defanserb
@defanserb 7 ай бұрын
He literally described every line of code in detail and you still complaining
@ForlornU
@ForlornU 7 ай бұрын
Explaining function by function is optimal, if its confusing, the code and the entire project is provided and you can open it side by side to follow along :)
@LykkeTil221
@LykkeTil221 4 ай бұрын
@@ForlornU i can get that, but it was super confusing when you didnt say what script some functions where in. Such as the struct. I did'nt realize that was its own script component until i found it in the git files.
@joshuanyamori
@joshuanyamori 2 ай бұрын
@@ForlornU just do it the "normal" way man, if you can add all this at the end of the video that would be great.. otherwise its a confusing video
Trajectory prediction in Unity
5:16
TNTC
Рет қаралды 47 М.
Please Help This Poor Boy 🙏
00:40
Alan Chikin Chow
Рет қаралды 22 МЛН
Стойкость Фёдора поразила всех!
00:58
МИНУС БАЛЛ
Рет қаралды 4,2 МЛН
when you have plan B 😂
00:11
Andrey Grechka
Рет қаралды 67 МЛН
Unity Game Objects vs Entities: performance benchmark
4:18
Visual Decomplicator
Рет қаралды 1,8 М.
From Beginner to Pro: Mastering Unity's Colliders
14:50
AnanDEV
Рет қаралды 8 М.
Projectile Movement & Why is it Useful? ( Unity Engine Tutorial )
13:41
A Bit Of Game Dev
Рет қаралды 35 М.
How to Simulate Projectiles WITHOUT PHYSICS in Unity3D
3:04
Explosions in Unity! Let's blow some stuff up ;)
6:00
Tarodev
Рет қаралды 43 М.
Projectile Trajectory Prediction in Unity
17:20
Sunny Valley Studio
Рет қаралды 9 М.