Тёмный

[Unreal Engine 4.7] Homing Missile Blueprint Tutorial 

Подписаться
Просмотров 58 тыс.
% 808

How to create a homing missile in Unreal Engine 4.7 with blueprints. Included is a targeting system with outline.
Feel free to comment on how bad my accent is or any future ideas you might have ;).

Игры

Опубликовано:

 

20 мар 2015

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 114   
@joshuag6383
@joshuag6383 3 года назад
6 years later and it still works, Thanks!
@nonchip
@nonchip 6 лет назад
you forgot to clear the HomingTarget if a wall is right-clicked. the current blueprint will clear the outline but still target the previous actor.
@PPZCN
@PPZCN 8 лет назад
Sir can you help me? It work about raw mesh but it dosen't homing blueprint for example I try to homing player pawn or homing actor blueprint It doesn't work, how can I fix it? thank you version4.10
@Andili76
@Andili76 7 лет назад
Hi Unain, There is no "GlobalPostProcessVolume" on my floor lvl. only a "PostProcessVolume". Is it maybe because of the Unreal Engine Version I am using = 4.14.3 ? Stuck at 18:25 mins..
@Unain
@Unain 7 лет назад
That's the one you want, it just got renamed to PostProcessVolume. Then go to misc -> blendables and continue following the tutorial.
@Andili76
@Andili76 7 лет назад
Hi Unain, That is where the problem is, I dont have the "misc" option in "PostProcessVolume".. No idea what the problem is..
@Unain
@Unain 7 лет назад
There is a tab with a yellow arrow called: Settings. You need to expand that section to see blendables.
@Andili76
@Andili76 7 лет назад
Will have a look as soon as I get back on Unreal tonight. Thanks for the advise Unain..
@BrandonNyman
@BrandonNyman 4 года назад
Thank You! I came more for the smoke trail but the rest was great too!
@Andili76
@Andili76 7 лет назад
Hi Unain, Perfect tutorial, finally someone who explained the process. Could you create a tutorial for a AA Flak automatically shooting at incoming Aircrafts with a 50 to 75%% hit chance. Thanks for sharing.
@THEAETIK
@THEAETIK 5 лет назад
Just add a random offset in the target position (XYZ). You probably just need to spawn explosions around the target since you normally don't see Flak IRL. Very easy.
@stabbedbyapanda
@stabbedbyapanda 8 лет назад
Please provide a link to the m_highlight and updated notes for how to do it in a newer version, one of your comments below fixes all newer issues.
@bulanjoe
@bulanjoe 8 лет назад
Hi. Great tutorial. I'm just stuck with a problem. I have exactly one target on the map, and the projectile should either hit it, or miss it. How could I reference this target (actor) for the projectile?
@maroonberet5946
@maroonberet5946 9 лет назад
I got a hover game but when i try to lock on a pawn it doesn't lock on. it only work with static mesh actors. did i do something wrong . pls answer back
@clym3danimator
@clym3danimator 8 лет назад
Hi there thanks for this tutorial! I know there might be some differences in versions - I've got everything to work, it hones in perfectly - but only ONCE. After honing to the FIRST object, it won't hone to another one. Have I missed a step? Thanks :)
@backup7202
@backup7202 6 лет назад
How would this work against none static meshes?
@cedgehammer2904
@cedgehammer2904 4 года назад
The ExampleProjectWelcome doesn't have the M_Highlight
@baisk7105
@baisk7105 7 лет назад
i Am using the 4.17 and i worked fot 2h on this tutorial and add the and nothing works it dosent create a line and the bullet dosent follow my enemy whant to do ?
@rasmushauschild
@rasmushauschild 7 лет назад
Is there any way of doing the highlighting part in version 15?
@MonkeyMulch
@MonkeyMulch 6 лет назад
Quick question, once you've locked onto a target then how do you change back to non homing missile? If I select no target then the missile still chases after the last selected target.
@tehf00n
@tehf00n 8 лет назад
Could you please explain how to make a schmoke and a pancake? Thanks :)
@pikaijzer
@pikaijzer 7 лет назад
Hey, Can someone help me? I want a homing projectile that targets a mesh after it flew through a box collision. I want to be able to shoot a projectile but it will go straight if there's nothing close to it but target the mesh if it is.
@pixelitedragon1720
@pixelitedragon1720 6 лет назад
What if I want to make it a multishot(it shot multiple rockets at once) and to make it if there is more target to hit, the rockets will hit one object each but will hit an object multiple times if there are less targets?
@dogamer238
@dogamer238 3 года назад
Does it works on a character ?
@parazoario
@parazoario 2 года назад
Great tutorial.
@Blue018Phoenix
@Blue018Phoenix 4 года назад
How do you do the same exept with a flying pawn that has the speed set to 6000
@TheNinngi
@TheNinngi 8 лет назад
any tips for version 4,11 ?? I m not geting the explosion on boxes, only spawn the particle emiter explosion at walls
@TriNity-GER
@TriNity-GER 9 лет назад
Ace! But could you explain the custom depth node a bit more? Dont get what it does^^
@Unain
@Unain 9 лет назад
MrPhinixa The Custom Depth node enables/disables it on a certain object. Now Custom Depth itself allows you to mask certain objects by rendering it into a separate buffer. This way you can render this buffer with a special material (M_Hightlight) and adjust certain pixels the way you like (extruding the edges for the line on the outside). You can read more about the Custom Depth buffer here: docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/PostProcessMaterials/index.html Its a pretty advanced topic, maybe I shouldn't have included it. But it looks so good ;).
@toh-kastrashcan8064
@toh-kastrashcan8064 6 лет назад
Can I apply to it to the player ? (That's for a Sonic Game)
@Aelo9975
@Aelo9975 5 лет назад
How do you keep the particle from deleting instantly
@jabringmann
@jabringmann 8 лет назад
My homing target works however with switching between physics bodies however , it does NOT return to a normal rocket when "right clicking" on a wall. anyone have this problem?
@Tinker_it
@Tinker_it 9 лет назад
Great tutorial, works in 4.8.1
@Unain
@Unain 9 лет назад
Tommy Smith Thanks for letting me and others know :).
@hyperatomart8
@hyperatomart8 6 лет назад
Hey mean great tutorial, going to implement some of what I learned from it into a project I'm working on. Just wondering, am I correct in assuming that if I set that homing target to be one static mesh it will always go to that mesh? I'm planning on using a mesh that acts as a target parented to the player character that becomes visible when you aim to fire the rockets at
@Unain
@Unain 6 лет назад
Yes, that should work fine
@shortbusheros4
@shortbusheros4 8 лет назад
I'm doing this in my own custom project and "Set Homing Target" is not a thing in mine. Is this because I am using 4.9?
@Unain
@Unain 8 лет назад
+shortbusheros4 Make sure your projectile has a Projectile Movement Component. Drag from that projectile variable in your blueprint, it should show up (just checked it myself in 4.9). If not, uncheck "context sensitive", it might show up that way :).
@shortbusheros4
@shortbusheros4 8 лет назад
+Unain Oh yeah that did it, I was using my own actor as a projectile with an offset on the event tick to propel it forward instead of the projectile movement since I didn't know what that was at the time.
@ty_teynium
@ty_teynium 5 лет назад
How about spawning more than one actor as a projectile?
@tontonmanu974
@tontonmanu974 6 лет назад
Ok for static mesh but for a blueprint actor ?
@ursoogarbage1801
@ursoogarbage1801 8 лет назад
I can't find the mhighlight in content example just the shiny object. Also I can't find the global post processing volume. Any help?
@stabbedbyapanda
@stabbedbyapanda 8 лет назад
i cant find the m highlight either, did u end up finding it?
@ursoogarbage1801
@ursoogarbage1801 8 лет назад
+stabbedbyapanda I forget which version it is but it was an older version of unreal that had it in the one example map if I find out for sure I'll let you know
@liamc7070
@liamc7070 6 лет назад
the explosion particle didn't appear for me
@mastermind1119
@mastermind1119 9 лет назад
Very useful tutorial.
@ad-hy8vf
@ad-hy8vf 8 лет назад
Hello, first of all this is a great tutorial, thanks to you and could make a homing missile, but I have a little problem as puego do not last longer any way out of "delay" "DestroyActor" anywhere, thanks for everything , a hug
@superunknowntv9117
@superunknowntv9117 8 лет назад
+UNAIN Can you make a Blueprint for a Rocket Launcher that can load 2 to 3 rockets by holding down a key as in the Unreal Tournament games?
@kaibachaoschampion
@kaibachaoschampion 9 лет назад
Can someone tell me where I get that example project for migrating at around 17:00? I can't seem to find it for download. Thanks :)
@Unain
@Unain 9 лет назад
kaibachaoschampion Should have mentioned that, but its in your Epic Games Launcher under the Learn tab (on the left). Then scroll down until Engine Feature Samples, its the first one called Content Examples. Good luck :).
@kaibachaoschampion
@kaibachaoschampion 9 лет назад
***** Getting it now, thanks. Now I can continue :D
@sinksinkswim
@sinksinkswim 9 лет назад
How would you modify this to create a targeting system like WoW where you press a button and it finds the nearest target and uses that as the HomingTarget? I've managed to set up a system where I can find the actors of a certain class within a certain distance from the playable character but I can't find a way to link it to this tutorial
@Unain
@Unain 9 лет назад
sinksinkswim You just have to modify the targeting system at 9:20. Get rid of the line trace. Use Cast to Static Mesh Actor on the actor you found with your function (find the nearest by looping through them all and checking your world location - actor world location -> lowest vector length). Then tie in the Cast to Static Mesh Actor end result into Set Homing Target at 14:30. Now when you right click it should target the nearest actor. Let me know if that works, if you still need help I will create a blueprint that shows it off and post a picture for you.
@sinksinkswim
@sinksinkswim 9 лет назад
***** I'm having a few difficulties with it. The first being that the targeting system I've set up uses Get All Actors of Class, so I'm having to use Cast to Enemy to get their relative distance - this seems to stop me using Cast to Static Mesh Actor afterwards. Ideally I would like to be able to find all actors within a specified range, add them to a 2D array and sort them by distance so that I could cycle through all actors (within the specified range) by order of distance from the player. However I'm led to believe that 2D arrays aren't a feature of UE4. Any advice would be greatly appreciated. Here is what the targeting function looks like i.imgur.com/hRvDkJu.jpg
@Unain
@Unain 9 лет назад
sinksinkswim The Enemy is an actor I presume? Then it should have a static mesh component connected to it. You can get the static mesh component from the actor. Unfortunately you can't use a 2D array indeed. But you can use an ignore array for all the actors you have already targeted. So say you find the closest enemy and target it, then you add that enemy to an ignore array. Next time you go through the search for closest enemy array check if the enemy is in the ignore array and move to the next one if so. When you get to the end and you have no targets, empty the ignore array so that you can target the first one again. There must be a better way though, but this is just off the top of my head :).
@sinksinkswim
@sinksinkswim 9 лет назад
***** Enemy is an actor. I think I can work out a method for cycling through the actors but without a 2D I'm not sure there's an easy way of sorting them by distance. Would you be able to show me what I need to do to my blueprint to use the mesh for the HomingTarget since the Target Enemy function and Fire Projectile functions are separate?
@Unain
@Unain 9 лет назад
sinksinkswim Btw feel free to add me on the Epic Games Launcher as a friend (Unain), might be easier than talking on here :).
@noisyether9211
@noisyether9211 5 лет назад
can you show how to make a character into a homing missile
@ScGendo
@ScGendo 9 лет назад
Using 4.7 but te Highlight system doesn't really work for me, what could it be?
@Unain
@Unain 9 лет назад
ScGendo Hard to guess without specifics, but I would check the targeting system with right mouse button first. Go through the whole sequence to see if everything is connected properly. After that, make sure you have added the M_Hightlight material to the blendables (in misc) on the PostProcessVolume (see around 18:10).
@ScGendo
@ScGendo 9 лет назад
***** Thanks for the reply, looking at it again seems everything as it should. It's ok if it doesn't work as i was looking for general BP practice and not a specific solution.
@ahmedtalha1557
@ahmedtalha1557 9 лет назад
check check box in 2nd set renderer castom dept ıt solves
@Agent-Nu11
@Agent-Nu11 9 лет назад
Can you tell me if this can work in third person template?, if so, how?
@AlexanderBasov
@AlexanderBasov 9 лет назад
HeavenHellGate00 if you understand all steps(i really recomend to understand what happend, an not just copy&paste) - moving this idea to any project is not a problem.
@zipkiev
@zipkiev 9 лет назад
try to ask, if i need to lock ma rocket on any part of my level(for example like rpg with red dot guided in HL), for now i have red dot bot DECAL (and 3 vector coordinate of this decal) how i can set homing to this vector
@Unain
@Unain 9 лет назад
zipkiev With this method you cant set the homing missile to a vector. But you could spawn an invisible static mesh actor/component (spawn actor node) at the vector coordinate and use that as your target.
@zipkiev
@zipkiev 9 лет назад
***** thx good idea
@NoelAKABigNolo
@NoelAKABigNolo 8 лет назад
Great tutorial man, it really helped a lot. One question though, how can I make so the smoke trail still visible after the projectile is destroyed? Thanks
@piattrocks
@piattrocks 8 лет назад
This might seem silly but maybe instead of destroying the projectile, set it to invisible or hide it (but not the smoke). Hope it helps! :)
@AlfredMorgan
@AlfredMorgan 8 лет назад
answers.unrealengine.com/questions/304823/make-it-easier-to-keep-particles-after-actor-death.html I did it by making the rocket actor hidden and disabled collision on the mesh and then deactivated the emitter component all instead of destroying the actor.
@zero-g-racer
@zero-g-racer 2 года назад
i solved the problem to spawning particle system on tick along the travel of rocket it works fine and don't take a lot of memory to work (i answer for future answers) i tough you found a way since 6 years
@JACKRAIDEN97
@JACKRAIDEN97 8 лет назад
So, I have cross checked and mine I am sure i copied you correctly. Here is my problem, it works on the first time, but continues to go to the second set render custom depth ( via is valid node ) and it will keep doing that. Wall detection is alright though, its as if i cant highlight more than one time.
@Unain
@Unain 8 лет назад
+JACK RAIDEN Could you post a screenshot of the blueprint that sets the custom render depth? Its a bit hard to guess what could be causing it :).
@JACKRAIDEN97
@JACKRAIDEN97 8 лет назад
haha np, i am actually surprised you replied so fast :)
@JACKRAIDEN97
@JACKRAIDEN97 8 лет назад
Here you go friend, I am pretty sure i am the one at fault here. Anyways, I have a lock on BP to lock on to targets when they enter a certain region of the screen automatically. I was wondering, if i want to fire a missile at them, is the ray tracing part even necessary when i already have the target location? How would I mix your BP and my lock on BP? Thanks. drive.google.com/file/d/0B6XWvSqhMmvgaG44MmdQQVAwZnc/view?usp=sharing
@Unain
@Unain 8 лет назад
+JACK RAIDEN In that case, the line trace is not needed. The line trace is only there to select the item you want to have a border. You want to loop through the targets (probably an array) you found in your other blueprint and use the Set Render Custom Depth on each target to true. Example: i.imgur.com/zCMupFd.png Now this example loops through all Static Mesh Actors in view (you probably don't want that), you want it to only loop through your specific class (Enemy/etc). But it will give you something to work with for now.
@JACKRAIDEN97
@JACKRAIDEN97 8 лет назад
***** Anyways, what was wrong in my bp that it doesn't work like yours?
@jonathanchung4583
@jonathanchung4583 5 лет назад
I the M_highlight file isn't there
@kevinplover3091
@kevinplover3091 5 лет назад
Anyone know how to extend the draw distance of the outline?
@piattrocks
@piattrocks 8 лет назад
Learned a lot. Thank you for your tutorials :)
@imagine-games6677
@imagine-games6677 7 лет назад
how could I make this target an enemy character?
@tyelliott6386
@tyelliott6386 7 лет назад
here is what i did to make it chase a certain character...instead of the custom event i used event begin play...hooked it to get all actors of class (make sure to specify the actor you want in actor class) then used for each loop...then plugged out actors to array on for each loop...dragged array element from for each loop and searched get capsule component and plugged it into homing target component on set homing target component and it worked
@AlexanderBasov
@AlexanderBasov 9 лет назад
Little addon: when missile hit the target - smoke trail just miss. It's acceptable, but not good. Simple fix for projectile event graph(OnHit Event): Set visibility(Sphere) - false Deactive component(P_SmokeTrail) Delay(2.5 seconds) Destroy Actor
@innovator1935
@innovator1935 9 лет назад
lool too nice bro nice job :) will be usefull :)
@adamc3607
@adamc3607 8 лет назад
awesome!!
@makkerfelix
@makkerfelix 8 лет назад
hallo mede tata! ik hoor het wel aan je accent
@Korealiklar
@Korealiklar 5 лет назад
thanks for smoke missile
@Ardures
@Ardures 8 лет назад
Thank you :)
@thetubeaccount2015
@thetubeaccount2015 9 лет назад
DAT ACCENT WOOOOOOOOOOOOO~ xD
@Grand-warden
@Grand-warden 3 года назад
Thanks
@nathanrae2660
@nathanrae2660 9 лет назад
You know your tutorial would of been very helpful if you had not missed the collision component set up.
@Unain
@Unain 9 лет назад
+Nathan Rae The collision component is already added on the FirstPersonProjectile (which is what we duplicate). I apologize if this is not longer the case in 4.9 though.
@nathanrae2660
@nathanrae2660 9 лет назад
Sorry, im trying to develop a space invaders game and am trying to set up the collision off a custom projectile but the only thing the projectile collides with at the moment is the player it self. Every thing else it goes through. I have to get the collision working before I set up the projectile homing system on the AI bots.
@Unain
@Unain 9 лет назад
+Nathan Rae You do have a collision component on the projectile then (because it collides with the player). When you select the collision component, you will have a tab called Collision on the right -> i.imgur.com/uODBqIm.png Change Collision Preset to say BlockAllDynamic for instance.
@renderloungevr189
@renderloungevr189 5 лет назад
Unain need to connect with you regarding a project if you are interested.
@Roonast
@Roonast 8 лет назад
Awesome tutorial man, I'm having some issues though, my homing projectiles just do not home, keeps finding 'None' for the Homing Target variable. I've attached some screens of my blueprints if you'd be kind to take a gander :)Twin Stick Pawn: i.imgur.com/rbRAQ9Y.jpg Rocket Projectile: i.imgur.com/NqnHgNc.jpg Fire Shot: i.imgur.com/hul8BDL.jpgI couldnt get the targeting to function on my enemies, with the 'StaticMeshActor' references, so they are all TwinStickElite references which require portions to be converted to Primitive Components, referencing the ShipMeshComponent.The highlight works, it just isnt writing the correct information to the Homing Target variable I imagine since this is printed out in the logs after playing:Error Accessed None 'K2Node_CustomEvent_TargetToHit' from node Set HomingTargetComponent in graph 'EventGraph' in blueprint RocketProjectileThanks for any help dude! ^_^
@Unain
@Unain 8 лет назад
+Roonast The cast to TwinStickElite in TwinStickPawn is the culprit. It should be Cast to Static Mesh Actor and the HomingTarget should be a Static Mesh Actor too. The targeting is really specific on what type of component it wants (even though some connect fine to it). It really wants a Static Mesh Component, every actor should have that. Also, check if the Cast to TwinStickElite is actually working. Add a debug message to the Cast Failed output, it might be having issues with the conversion.
@SupSupa10
@SupSupa10 9 лет назад
Goodjob ;)
@unrealengine4991
@unrealengine4991 6 лет назад
THHHHHHHHHHHHHANX
@androidwithsteve2629
@androidwithsteve2629 6 лет назад
ITDIDNT WORK dude
@richardchapman7360
@richardchapman7360 8 лет назад
No global post process volume in the world settings in 4.11. is there a way to add one?
@Tony_EZero_Proxy
@Tony_EZero_Proxy 6 лет назад
Hi. How to create the Reedeemer projectile (Unreal Tournament)? I want to control it in air and change the speed of moving.
@ikarus5915
@ikarus5915 7 лет назад
But how to make this in a 2d sidescroller? in the bp's ect. many components arent there
@calc3085
@calc3085 8 лет назад
How would you tell it to go to an object's position when you first targeted it and not update?
@Unain
@Unain 8 лет назад
Spawn an invisible, unhittable object at that position and use that as target.
Далее