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
@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 Жыл бұрын
Happy to help! Best of luck on your project!
@henryqng Жыл бұрын
Short and sweet. I liked and subscribed
@jakobanzengruber8688 Жыл бұрын
Best visual explanation i've ever seen. Keep up the great work💯
@ForlornU Жыл бұрын
Thanks, will do!
@simon59868 ай бұрын
Very useful tutorial! Helped me out lot.
@Notllamalord Жыл бұрын
That’s actually really cool
@TheAstrocricket Жыл бұрын
bro this is so underated
@spruslaks26 Жыл бұрын
Very interesting and useful, thanks for your effort
@castlecodersltd Жыл бұрын
Very good, thanks for sharing ☺
@random_precision_software Жыл бұрын
Hi , Ive just come across your channel. Ive Subbed and hope to see more content !!
@ForlornU Жыл бұрын
Appreciate the support! More content will come 👍
@akop11948 ай бұрын
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
@CodingWithUnity-k3q5 ай бұрын
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?
@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 Жыл бұрын
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 Жыл бұрын
@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 Жыл бұрын
@@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 Жыл бұрын
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
@MandeepSingh-xn3vbАй бұрын
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
@tonymax750325 күн бұрын
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
@Unity_Tutorial_Games Жыл бұрын
good
@lilbaby4PF Жыл бұрын
How would you go about, doing something like an arrow so it rotates along the path
@ForlornU Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
@@lilbaby4PF glad to help!
@shidou2380 Жыл бұрын
how can i change the value to z, because i try to use vector3 but its error missing reference
@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
@muhammadumair-ql5sm Жыл бұрын
vector 3 Velocity= Projectile.initialSpeed/projectile.mass* projectile.direction ....what formula is that ?
@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.
@joshuanyamori4 ай бұрын
One of those tutorials where the maker is trying to look cool instead of making a tutorial. Don't Bother
@diegohiroshiysusvideos2909 Жыл бұрын
Guau!, okey, good, I going to applied it into Stride Engine. Already I applied a RayToOrigin(), the next is this.
@ForlornU Жыл бұрын
Best of luck!
@8BEATER14 ай бұрын
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.
@ForlornU3 ай бұрын
I will keep this in mind for future videos, thank you
@TheLazyJAK Жыл бұрын
Would love to see this but in Godot!
@__Rizzler__ Жыл бұрын
man i hate tuples
@ForlornU Жыл бұрын
Sorry about that! 😂 Seemed like a fun idea at the time
@mhf1695 ай бұрын
It is the worst and most complicated tutorial on earth!!!!!
@LION30320010 ай бұрын
you should shown the actual scripts to understand it more rather than doing like this and talking about it and confuse us. 😔👎
@defanserb10 ай бұрын
He literally described every line of code in detail and you still complaining
@ForlornU9 ай бұрын
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 :)
@LykkeTil2217 ай бұрын
@@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.
@joshuanyamori4 ай бұрын
@@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