How to make a Homing Missile in Unity with Trajectory Prediction (source included)

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ม.ค. 2025

ความคิดเห็น • 123

  • @cppcompile
    @cppcompile 3 หลายเดือนก่อน +5

    this is how you make tutorials. stright to the point and concise

  • @auckzsv8599
    @auckzsv8599 2 ปีที่แล้ว +43

    This video shows a great combination of design and technique, in such a stylish way.

  • @Asjagadra
    @Asjagadra 2 ปีที่แล้ว +14

    I discovered you since only a month ago, but I am impressed that you are not more knowned from the community. All your videos are amazing! They are a great mix of a good idea with a clever implementation, it is well and clearly described and always visually pleasing. This new one illustrates that really well! Thank you for your work, I will spread the word and I hope you'll rise in fame because you deserve it!

  • @hegworks
    @hegworks 2 ปีที่แล้ว +3

    The Unity community should be glad and proud that has such geniuses like you.
    Keep it up bro!

  • @bluzenkk
    @bluzenkk 2 ปีที่แล้ว +2

    Coincidently, I was researching how to make homing missile yesterday and today I see you just made a video on it.
    As if you read my mind from miles away.

  • @neipo
    @neipo 2 ปีที่แล้ว +3

    Always looking for a non-beginner tutorial on doing something specific in a concise manner. This channel does even better by being incredibly well produced as well. Channel trajectory pointing straight upward. Long as there are as many people as I suspect are ready to step past the line by line tutorial. (plus full source available? wildly great stuff)

  • @YasserSedrati
    @YasserSedrati 2 ปีที่แล้ว +2

    Straight to the point! Love your short videos.

  • @bradb5129
    @bradb5129 ปีที่แล้ว +1

    this is prolly the best made tutorial i’ve ever seen

    • @Tarodev
      @Tarodev  ปีที่แล้ว

      Whoa

    • @bradb5129
      @bradb5129 ปีที่แล้ว

      no homo

    • @Tarodev
      @Tarodev  ปีที่แล้ว

      @@bradb5129 nothing's off the table bro

  • @tylerheenan9393
    @tylerheenan9393 2 ปีที่แล้ว

    Been a Unity dev for 6 years and your content has to be some of the absolute best on TH-cam.

  • @DanPos
    @DanPos 2 ปีที่แล้ว +2

    Simple and to the point, cracking stuff Tarodev!

  • @PixelbugStudio
    @PixelbugStudio 2 ปีที่แล้ว +3

    Loved these small videos. We need more of these.

  • @tomazznidarko8700
    @tomazznidarko8700 2 ปีที่แล้ว +2

    Thank you once again for your contribution to Unity community. It really helps a lot to learn for beginners like me.

  • @raoulbest5395
    @raoulbest5395 2 ปีที่แล้ว +6

    This is amazing! You've struck a perfect balance between visual quality, code amout and video speed and duration.
    unfortunatly youtube does not like small particles and even in 1080p the video was quite blocky

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว +1

      Yeah man, tell me about it. YT ripped it to shreds :( Partly my fault for the vignette. Live and learn!

  • @RainDevs
    @RainDevs 2 ปีที่แล้ว

    I finally found someone who knows exactly what they're talking about and can teach it in a simple incredible way! You are very talented!

  • @thepralad1484
    @thepralad1484 2 ปีที่แล้ว +1

    wow tarodev new vid!

  • @Spreadmouse
    @Spreadmouse 2 ปีที่แล้ว +106

    Taro, i really love your high quality simple and short tutorials. You make even better tutorials than brackeys, if you keep it up you will maybe be the new brackeys

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว +18

      Damn... thanks man

    • @zelos666
      @zelos666 2 ปีที่แล้ว +7

      @@Tarodev I agree. I can't overstate how long I've been looking for something that goes beyond the absolute basics. And you're presenting these topics in a way that actually makes it really easy to implement them in your own game.

    • @RalphH007
      @RalphH007 2 ปีที่แล้ว +3

      Woah woah woah, that is heresy ;)

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว +6

      @@RalphH007 brackeys, our lord and saviour

    • @ragerungames
      @ragerungames 2 ปีที่แล้ว +2

      man to be very honest I was thinking the same today. Brackeys is good for beginners but Tarodev is good for beginners and intermediate / advance :D
      Tarodev = Brackey^2
      I don't know if Taro started his channel right after Brackeys quit

  • @fisekoo
    @fisekoo 2 ปีที่แล้ว +6

    you are amazing Taro. I really like your videos and tutorials, it really helps me a lot. Keep it up!

  • @samochreno
    @samochreno 2 ปีที่แล้ว +1

    best unity channel rn

  • @krissloo143
    @krissloo143 2 ปีที่แล้ว +1

    Yet again, me thinking I got perfect missiles only to see this awesome cosine feature :)
    You rock!

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว

      You could also add sin on the Y axis for a full circle rotation. That'd look cool :)

  • @nielsbckx8439
    @nielsbckx8439 2 ปีที่แล้ว +2

    Great content and visuals for a one and a half minute video 👍 Love

  • @nanifiqueyt
    @nanifiqueyt 2 ปีที่แล้ว +1

    Best content out there, quick and straight to the point.

  • @ASouza-ut9kb
    @ASouza-ut9kb ปีที่แล้ว +1

    Ultra high level video! Thanks dude.

  • @marcelboersma
    @marcelboersma 2 ปีที่แล้ว +2

    Awesome video man! Thanks for your excellent content.

  • @sapientunderground
    @sapientunderground 2 ปีที่แล้ว +1

    Nifty, I look forward to making use of this.

  • @KifDawg
    @KifDawg 2 ปีที่แล้ว +3

    the perfect tutorial

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว +1

      The perfect viewer ♥

  • @guyabikhair7066
    @guyabikhair7066 2 ปีที่แล้ว

    The most underrated channel on youtube

  • @Tharky
    @Tharky 2 ปีที่แล้ว +3

    Another great tutorial, can easily be remade in 2D as well with the logic💙

  • @あれくす
    @あれくす 2 ปีที่แล้ว +1

    wow that is so cool! Thanks a bunch!!

  • @TackleProd
    @TackleProd 2 ปีที่แล้ว +1

    Really cool, especially the reaction time based on distance. Going to implement this in 2D later :)

  • @jiataosu7846
    @jiataosu7846 2 ปีที่แล้ว

    Your work is amazingly professional for how little views you get! I think eventually you will get the recognition you deserve!

  • @brodendangio4810
    @brodendangio4810 2 ปีที่แล้ว +1

    @Tarodev - You're a rocket, these tutorials are engine fuel, and your channel is headed to the Moon!

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว +1

      Yay 😂

  • @AnimalPlayground
    @AnimalPlayground 2 หลายเดือนก่อน

    Thanks a lot! I learnt a lot from your code. Concise and very effective.

  • @jacktruong7151
    @jacktruong7151 ปีที่แล้ว +1

    U really saved my day

  • @octe-es
    @octe-es 2 ปีที่แล้ว +2

    Tarodev I really love u ❤️ great tutorial!

  • @thricemindblown7883
    @thricemindblown7883 ปีที่แล้ว +1

    What a convenient and digestible video.

    • @Tarodev
      @Tarodev  ปีที่แล้ว

      Hope it helped ❤️

  • @qiangpanchen6785
    @qiangpanchen6785 2 ปีที่แล้ว +1

    nice! I could imagine using this to create a shoot and run game :))) Thank you!

  • @pa_de_queijo
    @pa_de_queijo 2 ปีที่แล้ว +1

    Great! Very simple and practical!

  • @iamgruff
    @iamgruff 2 ปีที่แล้ว +1

    Brackeys 2.0 Plus - love your work bossman. Thanks for the inspirations🍺

  • @fulongfromthegrave
    @fulongfromthegrave 2 ปีที่แล้ว +1

    Excellent content! Love the production value added by the terrain and audio... where did you get these trees?? 🤣🤣

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว

      I think I grabbed them from a bunch of places. I'm using the same project as my Find Life video, so I just cherry picked random stuff left over 😜

  • @AliRavencoreAdam
    @AliRavencoreAdam ปีที่แล้ว

    This is awesome!

  • @AetherXIV
    @AetherXIV 2 ปีที่แล้ว

    perfect for my project. ty

  • @ScrewY0UguyS
    @ScrewY0UguyS 2 ปีที่แล้ว

    This is perfect tutorial. Thanks!

  • @rize2137
    @rize2137 2 ปีที่แล้ว +1

    Gorgeous!

  • @castlecodersltd
    @castlecodersltd ปีที่แล้ว

    Excellent, thanks ☺

  • @24-Com
    @24-Com 2 ปีที่แล้ว +1

    Totally awesome

  • @NowKnownMAWO
    @NowKnownMAWO 2 ปีที่แล้ว

    Like always a little but powerfull tutorial :) Thanks a lot!

  • @Jamie_Gamedev
    @Jamie_Gamedev 2 ปีที่แล้ว +1

    I can’t wait until we see game mechanics in them satisfying trend videos.

  • @alextreme98
    @alextreme98 2 ปีที่แล้ว

    So cool, nice tutorial 😁

  • @kamienel9941
    @kamienel9941 2 ปีที่แล้ว +3

    Nice video I would like to point 2 things putting code below the video is making it harder to see for people using subtitles and the audio volume of this video seems a little off

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว +3

      Ohhhhh!! Good point. Damn... I'll try remember that for next time

  • @sidremus
    @sidremus 2 ปีที่แล้ว +2

    Excellent and concise video! A small follow-up question: how'd I make it so the rocket does more of a roll and pitch movement? Is there a way to define an "up" for this method so? Then it would make for very nice airplane like flight behavior

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว

      Do you mean circular noise instead of jus horizontal? Adding Mathf.Sin to the Y deviation should do the trick.

    • @sidremus
      @sidremus 2 ปีที่แล้ว

      @@Tarodev no, more like the flight behavior of an airplane where you'd first roll so top's facing the target and then pitch up.

    • @libberator5891
      @libberator5891 2 ปีที่แล้ว +1

      @@sidremus There's probably better ways to achieve that, but here's my idea:
      1. Get the targetDirection vector (targetPos - projectilePos). You could use _standardPrediction or _deviatedPrediction instead of targetPos to better match your other rotations.
      2. Do a dot product between the targetDirection and your projectile's transform.right vector: if it's positive, lean/rotate right; if it's negative, roll to the left (adding degrees to your z rotation, assuming z is your projectile's forward vector)
      Note: if the target is directly to the right, the dotproduct will be 1. Directly to the left will be -1. Directly in front, behind, above, and below will be 0, so you'll have to work out the rest but it's an idea to get you started

    • @midniteoilsoftware
      @midniteoilsoftware 2 ปีที่แล้ว +1

      @@libberator5891 Good ideas. I have a 3D space shooter that's currently only playable on desktop or WebGL. I've been thinking of how to port it to mobile but am hung up on the controls. The desktop version has yaw/pitch/thrust controls. I can't see how to do that easily on mobile, even with multiple thumbsticks because you'd need a 3rd thumb for the fire button - lol. Having it automatically roll would solve that problem.

  • @datablob
    @datablob 2 ปีที่แล้ว +1

    That intro 😍

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว

      I knew you'd love it blobby

  • @johnanthony44
    @johnanthony44 2 ปีที่แล้ว +1

    Thank you for this! Can you make a tutorial on creating turrets that can fire at a target in motion with variable speed projectiles?

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว

      Sounds fun!

  • @fredimachadonet
    @fredimachadonet 2 ปีที่แล้ว +1

    Awesome content! Thanks! Do you have a tutorial for the wind particles/trails that appear occasionally ? It looks really good.

    • @fredimachadonet
      @fredimachadonet 2 ปีที่แล้ว +1

      Oh nvm, I think it's from the Epic Toon Fx asset. Thanks!

  • @sickboi11111
    @sickboi11111 2 ปีที่แล้ว +1

    Nice video!
    How do you record the output from unity?
    Do you just use a screen recorder like OBS?

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว +1

      Unity video recorder. Official plugin :)

  • @lukaspichler1264
    @lukaspichler1264 2 ปีที่แล้ว +1

    really cool video!!! how would you implement that the missile dodges terrain?

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว +1

      I'd normally say you wouldn't fire a missile at terrain in real life so it's probably not required, but I would send raycasts forward and when ground is detected skew away from it.

  • @hpchannel5463
    @hpchannel5463 ปีที่แล้ว

    Awesome video. I would love to know more about the camera script.

  • @homemacai
    @homemacai 2 ปีที่แล้ว +1

    Noice!

  • @mayankbhaisora2699
    @mayankbhaisora2699 2 ปีที่แล้ว +1

    Wow man

  • @youcancallmedoggie
    @youcancallmedoggie 2 ปีที่แล้ว +1

    Danke!!

  • @pygarg26
    @pygarg26 6 หลายเดือนก่อน

    Thx a lot

  • @kennisdev
    @kennisdev 2 ปีที่แล้ว +1

    you's awesome :0

  • @NguyenNgoc-kr9ux
    @NguyenNgoc-kr9ux 2 ปีที่แล้ว +1

    Hi, can you make a video about script performance optimization pls, thanks

  • @leonidus101
    @leonidus101 2 ปีที่แล้ว

    Holy ****, 1:32 seconds tutorial and all important and even advanced stuff about a homing missile presented. But BE WARNED this is not for beginners, because the Quaternion and corresponding Unity functions are not explained here. Still, Brackeys homing missile tutorial was just smoked right here right now..

  • @rapaltiar
    @rapaltiar 2 ปีที่แล้ว

    Could you give a little more explanation regarding prediction?! Gr8 video though!

  • @ikenna2058
    @ikenna2058 2 ปีที่แล้ว

    Please can you make a video on how you make your game graphic look soo good, btw love your videos

  • @boogetow3484
    @boogetow3484 2 ปีที่แล้ว

    How do you do your graphics and effects? In all your videos your games look so nice i would love to learn how

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว

      This one is just a terrain which I molded and painted and some nice lighting 😊
      I do plan on doing a visuals video

    • @boogetow3484
      @boogetow3484 2 ปีที่แล้ว

      @@Tarodev I see, my comment is more overall in all your videos, the object pooling video had crazy nice looking T symbols, the DOtween video also had very beautiful looking shapes in it. Is it shader magic or something else? I would love to learn how to make my games look this good

  • @iiropeltonen
    @iiropeltonen 2 ปีที่แล้ว

    Your videos are usually extremely clear. While this was fairly simple I found this format more difficult to follow.

  • @darkdoom907
    @darkdoom907 2 ปีที่แล้ว

    a homing missile, but elaborated video, I am a learner and its quite difficult for me to grasp the script, i mean what is var?

    • @darkdoom907
      @darkdoom907 2 ปีที่แล้ว

      Okay i got past those, but what was the _deviatedprediction and now i dont get the predictMovement method;(

  • @negus3530
    @negus3530 ปีที่แล้ว

    Hello! I have a problem with my missile. When the target evades and stays still, the missile just does circles around it orbit like behaviour, is there any name for this? because i cannot search any fixes for this

  • @walney2008
    @walney2008 2 ปีที่แล้ว

    hello, can you teach how to configure a helicopter and have a sight to launch rockets on it?

  • @Димас-ТвойРазработчикИгр
    @Димас-ТвойРазработчикИгр 2 ปีที่แล้ว +2

    💣

  • @panickal
    @panickal ปีที่แล้ว

    No velocity change sadly. Adding velocity instead of setting it with this code makes the missile behave strangely in some ways. Been trying to fix it for some time.

  • @duh160
    @duh160 2 หลายเดือนก่อน

    Can I have the camera tutorial? please...

  • @wortwortwort117
    @wortwortwort117 2 ปีที่แล้ว

    How can we allow the homing missles to work after being instantiated?

  • @eladonstar2721
    @eladonstar2721 2 ปีที่แล้ว +1

    Unity textmesh pro... Lol... Nice intro

  • @t83245
    @t83245 2 ปีที่แล้ว

    S500 missile game the best

  • @dev.ashesh
    @dev.ashesh ปีที่แล้ว

    This works on online multiplayer?

  • @l.manoelsousa3468
    @l.manoelsousa3468 2 ปีที่แล้ว

    Whta the neme of the music?

  • @ivanchez
    @ivanchez 2 ปีที่แล้ว

    Nintendo hire this man!

  • @panmacius2171
    @panmacius2171 2 ปีที่แล้ว

    Now, I can make opressor mk2 in my unity game

  • @huseyinakkoc1062
    @huseyinakkoc1062 ปีที่แล้ว

    how can I implement it in 2d ? can you pls help

  • @rangerthememe1305
    @rangerthememe1305 ปีที่แล้ว

    Thought this was going to be a aim 9 coding tut now doubly confused

  • @BlackoutGamingChannel
    @BlackoutGamingChannel 2 ปีที่แล้ว +1

    I would have unsubscribed if that rocket didn't impact & explode 😂😂😂

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว

      Haha! I wouldn't do that to you man

  • @irgiefarras
    @irgiefarras 2 ปีที่แล้ว

    "in a realistic way" if you watch how it works in a movies like top gun or some random pakistani dogfighting film then it's trus, but i think that's okay for a game

  • @Vlad-xz9ro
    @Vlad-xz9ro 2 ปีที่แล้ว +1

    I am from Ukraine and this video has just been shown in my recommendations.😅😅😆

    • @Tarodev
      @Tarodev  2 ปีที่แล้ว

      Oh gosh lol!