Unreal Engine 5 Projectile Tutorial: Homing Rockets

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

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

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

    your tutorial is amazing good ... with complete explain every things .. how i didnt find you until now !! Good JOB man

  • @GameDevAraz
    @GameDevAraz 7 หลายเดือนก่อน +2

    warning idk if this works on moving target, you will need to constantly feed the moving targets current location the the target of the missile, so it needs extra code set up, not a one click fix

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

    At 3:46, why do we add the start location to the end location vector? I don't really understand what's going on there. XYZ plus a vector gives us what, a new XYZ along that vector?
    Cool tutorial though! I'm looking to make a gas bottle that takes off wildly when shot. Any recommendations for that?

    • @Pyra-C-GS
      @Pyra-C-GS  ปีที่แล้ว +1

      my understanding of it is the forward vector is a normalised value, so the XYZ are all ranges from -1 to 1, it only tells us which way we are facing and not where that location is, we multiply by a value to extend the distance the line is going to travel but to get the location it's going to travel to we need to add our world location.. so basically Direction * distance + our location equals the end of the trace. hope that makes sense?
      For your gas bottle you could try using a 'add impulse' node and add a 'random float in range' for the XYZ.. for the Z make sure the min and max are both positive so it always has an upwards trajectory of some kind and the X and Y could range from something like -80 to 80 which will give it a randomness to the direction.
      Alternatively use a projectile movement component which activates when shot, you could add random numbers to the velocity while it's traveling to make its flight path erratic and unpredictable.

  • @walney2008
    @walney2008 11 วันที่ผ่านมา

    Could you teach how to place the missiles and make this Vigilante missile launcher (West_AA_Patriot) work? It would be very interesting for your channel.

  • @jacksonhall8945
    @jacksonhall8945 10 หลายเดือนก่อน

    Hey there! Followed your tutorial a couple of times, and everything works except… the rockets don’t actually detect a collision with something else. Doesn’t matter if it’s a wall, an enemy, the floor, etc. It sure homes to the like trace, but the rockets go right through the target and then circle back to try and hit the target again but fly right through. Any suggestions?

    • @jacksonhall8945
      @jacksonhall8945 10 หลายเดือนก่อน +1

      Nevermind! If anyone else runs into this issue, ensure that you move the static mesh component of the rocket on top of the Default Scene Root, to replace the root with the mesh. Then it’s all chilling

  • @walney2008
    @walney2008 8 วันที่ผ่านมา

    Hi, thank you very much for your video. I managed to make the missile launcher, but I want to learn how to mark a target and the missile follow, to learn how to place the Vigilante helicopter model and create a guided missile launcher like in the game War Thunder, can you teach me when you have time? I'm from Brazil and I use a translator, thank you.

  • @djhyperkid86
    @djhyperkid86 9 หลายเดือนก่อน +1

    Will this also work with the third person template? I would love to add this to my game.

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

    Great video - how would you create a guided missile though with the mouse input ?

  • @dioney-be7dm
    @dioney-be7dm ปีที่แล้ว +1

    How did you install it to UE5? It says it is only downloadable for ue4

  • @jacksonhall8945
    @jacksonhall8945 9 หลายเดือนก่อน

    Hi there, have this tutorial fully implemented and it works great but I’m curious about something. This works just fine when the scanned actor is a pawn or some small object. But when I scan an architecture element, like a wall or a floor, the rocket goes to a fixed point of that element, not where the player scanned. I understand the homing mechanic is bound to a component, but do you know of a way to make the rocket home to the location the player scanned instead of to the component they scanned? I want my projectile to home to the component of enemies, but to go to the scanned location if the target is anything else. Would really appreciate any help you could provide! Thank you!

    • @ESFORGE
      @ESFORGE 9 หลายเดือนก่อน

      because of it hits the main origin point of that object , the middle of that object

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

    I can't find anywhere how to make the smoke from the rocket not disappear immediately after it hits. The smoke plume is destroyed along with the actor instead of fading out smoothly. How can it be separated?

    • @Pyra-C-GS
      @Pyra-C-GS  ปีที่แล้ว

      I'm not overly familiar with particle effects in unreal, hence why I'm using a content pack at the moment, it might be better in the newer Niagara system? I'll take a look at the problem and see what I can find. It's a bit of a workaround but spawning another particle at location (the same location as the explosion particle) and selecting the smoke might be worth a try.

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

      ​@@Pyra-C-GS Thanks for the answer. I found a solution for myself) Before destroying the actor, I set a delay equal to the lifetime of the particles and before it launched the deactivation of the niagara, and turned off the collision of the projectile.

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

      simply create a new actor, keep scene component, add the niagara effect to it.
      on the rocket BP actor, set the new actor spawn, and attach actor to actor, on hit : trigger set life span of the niagare actor, then destroy the actor. that way it will reduce the stress over memory of 'undead' particles actors
      Edit : just found out you need a event tick to check if the rocket lifespan is equal to 0 : branch : on true , Set trail lifespan to desire ammount.
      Otherwise if you rocket disapear after X time without hitting anything the particle will remain alive = undisered memory stress
      hope you'll enjoy that

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

    I really appreciate you putting this video together! I do have a problem/question - I'm trying to incorporate this into a racing game. When my projectile hits the box, it has no effect (I get the explosion effect, but the box doesn't get pushed around). When I ram the box with my car, the box goes flying. I tried setting the box's mass to .02 Kg, and upping the Force Strength and the impulse strength up into the millions. Do you have any suggestions?

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

    Thanks bro

  • @MohdZeeshan-u1g
    @MohdZeeshan-u1g 9 หลายเดือนก่อน

    new subs. thnks man

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

    dummy question, high velocity rockets (like 6000+ max speed) i got a random offset to the target. even i made the magnitude to 10000.... im confused how to fix that. (i shoot my rocket from a car that can move fast)

    • @Pyra-C-GS
      @Pyra-C-GS  ปีที่แล้ว

      is this for homing rockets in particular? if so you might need to increase the homing velocity a little more to compensate for the high speed

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

      @@Pyra-C-GS already did the trouble is the missile miss the target no matter what the magnitude. (It's aiming the root component) could this be a problem ?

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

      same problem but i fixed it.

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

    The missile doesn't home to the line trace whatsoever for me, I have no idea why! Built it twice from scratch. Can you please help me figure out what's wrong?

    • @Pyra-C-GS
      @Pyra-C-GS  ปีที่แล้ว

      the first step id take is to get a print string and plug the 'hit component' from the line trace into it, it'll let you know if the line trace is actually doing what you expect. do you get any errors?

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

      @@Pyra-C-GS No errors, just fires straight even after placing the trace, do you have discord?

    • @Pyra-C-GS
      @Pyra-C-GS  ปีที่แล้ว

      @@Galvatorrix Pyra#5376

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

      @@Pyra-C-GS I will add you in just a minute thank you, will show you what i got

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

      same here

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

    Awesome!

  • @hopl5577
    @hopl5577 10 หลายเดือนก่อน

    Nice bro