Unreal Engine - Turret Tutorial

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

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

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

    3:45 - Setting up turret
    11:15 - Find best target
    19:20 - Has line of sight
    24:05 - Set target
    26:45 - Update turret rotation
    33:55 - Update fire
    41:55 - FIre event

  • @BlueprintBro
    @BlueprintBro 3 ปีที่แล้ว +10

    I'm an absolute beginner in Unreal, I learned a lot and found this extremely helpful!! Thank you so much

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

    Excellent tutorial, excellent blueprint organisation & structure. It is one hour long but it is extremely satisfying to see such clean content, you're pace is great, I also didn't need to pause during the whole process. And it works like a charm.

  • @Simon-pi9qx
    @Simon-pi9qx 4 ปีที่แล้ว +9

    Man your tutorials are very clean ! Keep going !!

    • @Simon-pi9qx
      @Simon-pi9qx 4 ปีที่แล้ว

      I've seen a lot of your tutorials and I see that you have an excellent level on UE4. I'm trying to build a "fairy in Zelda" type pet that follows you while flying and can disappear automatically, and can also be used as a target point when you lock an enemy. Do you think this is something you could do in a tutorial because I have no idea how to approach the problem?

    • @ReidsChannel
      @ReidsChannel  4 ปีที่แล้ว +3

      @@Simon-pi9qx Hmm perhaps, I'll consider it for an upcoming tutorial

  • @TriInfinity
    @TriInfinity ปีที่แล้ว +5

    Little updates for people trying it in UE5 (it works by the way):
    "float x float" and "float > float" and similar comparisons were stripped from the actual datatype, instead there are general methods, that do type checking well abstracted away from you on the inside.

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

    25:20, Troubleshooting note:
    I wasn't getting it to print anything on my first try, even though the nodes and settings were all correct. The problem was I modeled my turret already assembled/floating, and that means my turret top pivot was on/in the floor so it couldn't see anything. Because the world location of the Has Line of Sight node goes off of the input's pivot, the tutorial didn't have this problem since the turret's top was moved up in the BP.
    Solution: Add an arrow utility component to the BP, move it up to around your top turret piece, and then make the arrow the parent to the turret pieces. Then set the arrow as the input for the Has Line of Sight node.

    • @Leader-uq5im
      @Leader-uq5im ปีที่แล้ว

      can I hug you? I already thought that the turret would be the problem since my pivot points are always messed up

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

      Thanks so much man helped me as well!

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

    One of the best tutorials I've seen, love the organizations and the explinations

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

      did you do it in ue5 ???

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

      @@bonus4787 yes, worked perfectly

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

    So i have studied this video for about 1 mounth now. I have come to the conclusion that at the actual state of thing, is much more efficent to do this using behaviour three and Blackboard. The reason is that if for example the target hides behind a wall and you would like for example to wait about 5 sec before make the turret go back to the original position....the things kinda became complicate. So after trying and trying i have succeded using set timer events and adjusting some variables here and there, but still i was having some problems for example if i was out of the turret range, the turret was still on going....and every time i had to modify the algoritm, was kind complicate. So i tried doing the dame thing with IA and IA sensing, and a combination of tasks and service for the searching and shoting of the target. I used most of your algoritms and the result fit much better in my needs and it's easyer to add new behaviour this way. But thanks anyway for this great tutorial.

  • @Puddin
    @Puddin 3 ปีที่แล้ว +4

    Unfortunately this doesn't act the same as the turrets you show in the beginning. Once it acquires a best target it then keeps firing at said target once even after it goes out of range. It only stops when a new target comes within the sphere and then it will just constantly fire on that one. This can be fixed by adding two nodes. Between the SphereOverlapActors node and the ForEachLoop add a branch. The branch condition will run off the boolean return value on the SphereOverlapActors. then pass the exec from the SphereOverlapActors to the branch, then the true output to the ForEachLoop. Then on the false part of the new branch have it set an empty Target variable. This way when no actor is within the sphere it wipes whatever is stored as the Target

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

    Thanks for the great tutorial - it was very easy to follow and it worked perfectly! Thanks for sharing the assets as well - that was a huge help!

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

    Thank you so much!! This really helped me understand how it works and not just copy what's to be done, great explanations

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

    Amazing Job, this tutorial was not only easy but very efficiently done, very very good man!

  • @AsGLeagueStudios
    @AsGLeagueStudios 3 ปีที่แล้ว

    46:37 you can drag on top as long as it not actually hovering over the word just pull it to the bubble empty space or edge

  • @LolLol-ok4lr
    @LolLol-ok4lr 4 ปีที่แล้ว +11

    Dont mind me just commenting so that the algorithm can notice you :)

  • @dimitardimitrov7950
    @dimitardimitrov7950 3 ปีที่แล้ว

    thank you, I followed your lesson carefully and everything went well. I use this as the basis for my idea for Tower Defense RTS. I modified some things for other types of towers so that it can rotate differently, like the top rotates in pitch and the base in Yaw.Thank you again grate tuttorial.

  • @1Life.Forever
    @1Life.Forever 3 ปีที่แล้ว

    Excellent tutorial, thank you so much. Everything is clear and without unnecessary bla bla. I am just getting pleasure from it, already subscribed

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

    Very informative, Even though I wasn't interested in creating a torrent, I've learned a lot. Thanks!

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

    When I do this, "Has Line of Sight" line trace is always true, even when I'm behind other objects. How come? Do objects need to have some property to make the linecast not work? I checked the "From" and "To" vectors within the function and its correct.

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

    it took me a long time but this was a great tutorial very well explained,

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

    Hey, very very thanks friend, your tutorial is very goooooooood! God bless you

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

    You AMAZING MAN! BIG THX for this tutorial!)

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

    Very good video brother, I wanna be you one day. I'm actually going through courses to be a game designer/programmer and you've been a big help

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

      Best of luck!

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

      Thank you. By any chance, how could I convert this to just go off a sphere collision for the rotation? Do I just take out the line of sight function?

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

      ​@@Opt4grunt If u take it out it will try to shoot through walls

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

    Awesome tutorial! Thanks so much for sharing :)

  • @ManuelSanchez-gv3mq
    @ManuelSanchez-gv3mq 7 หลายเดือนก่อน

    Thank you so much for this!

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

    probs 2 years to late too type here but when i did the rotation part of the tower i have the tower head looking at me from the wrong angle i have the side facing me rather than the front

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

    I have a problem that when the turret rotates it detaches from my platform and moves somewhere else, how do i fix this?

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

    I am doing it for a third person game so what do I do?

  • @matchstickpro
    @matchstickpro 3 ปีที่แล้ว

    Amazing Tutorial, Thank you!

  • @ivan_e1775
    @ivan_e1775 3 หลายเดือนก่อน

    Very good tutorial, thx.

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

    Love the video. I am applying this to a turret that I have modeled myself and the head of the model will turn 90 degrees before tracking and will tilt. I have turned off gravity for the top of the turret as I thought it would be the head is to heavy or something but I was wrong. Can I be pointed in the right direction to stop the 90 degrees when it starts to track the player and if there is anything I have missed for the tilting of the head. Thanks

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

      was able to fix. I missed out a step. Thx for the tutorial. helped massively!

  • @AsGLeagueStudios
    @AsGLeagueStudios 3 ปีที่แล้ว

    What if you wanted the barrel to spin instead of going in and out what curve do I use?

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

    Hello, I am writing from Russia, using Google translator, I have such a question, I don’t see any errors in the blueprints, but the shells from the cannon fall vertically down, and do not fly at the character, how to solve this problem?

    • @Toweli3
      @Toweli3 3 ปีที่แล้ว

      turning the gravity scale down on your projectile perhaps?

    • @lovecraft96
      @lovecraft96 3 ปีที่แล้ว

      @@Toweli3 would like to know how to do it

  • @MZONE3D
    @MZONE3D 3 ปีที่แล้ว

    superb tutorial thanks for sharing

  • @AsGLeagueStudios
    @AsGLeagueStudios 3 ปีที่แล้ว

    also how in multiplayer it will look at ex. other player, and on their screen look at me.. I think we'll need to OnRep something like the target maby idk

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

    My turret goes 90 degrees more than it should and dont know why

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

    I'm an beginner in Unreal and i have ? hope u can answer them 1. did u make your own custom turret unreal engine or in other program. 2. did u also have to make it shot if unreal engine or in that other program that is if u have to use the different program.. 3. lol sorry for the ? but im a beginner and i have so many cant help but ask

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

      I used blender to model the turret then i imported it into unreal and used blueprints to make it shoot.

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

      @@ReidsChannel ahhhh ok makes sense great video ya it does help me understand how to make stuff now that i know this thank you very much

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

    where can i set the speed which the projectile has or how far it can shoot?:)

  • @Shirotsune-Tomuro
    @Shirotsune-Tomuro 2 ปีที่แล้ว

    how would i get the turret to track actors instead of the player? im doing a tower defense game.

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

      Just let them spawn. I used an alien mesh from the store, build a little blueprint to make it spawn automatically and it gets detected, I put the main player / camera into my ignore list, otherwise I get shot in the face when moving to close :D

  • @jaktwyford3931
    @jaktwyford3931 3 ปีที่แล้ว

    So Helpful thanks!

  • @sashagsn4828
    @sashagsn4828 4 ปีที่แล้ว

    great video !
    One Q : why you are setting the relative location of the barells (by timeline) , instead of adding relative location ? it is becase you've attached barrels to a sockets ?

    • @ReidsChannel
      @ReidsChannel  4 ปีที่แล้ว

      If you use add, floating point error will accumulate overtime.

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

    Dunno if this will be seen but, For some reason my Line of sight result is reversed... I think. It prints the string when I remove the not bool from the functionlib but doesnt print with the not bool connected.
    Any help is appreciated! Loving the video.

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

      This helped me, it wasn't rotating with the player unless i set the result bool to false

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

      @@col_panic9802 I had to put 180° in the towers rotation inside the blueprint to fix the watching direction. But this seems unrelated to this thing. Just dropping it here.

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

    New sub here. great video thank you. ill check out the rest of ur content.

  • @Furios_Ethan
    @Furios_Ethan 4 ปีที่แล้ว

    For some reason my turret looks at by the side not the front idk why that's happening

    • @Shirotsune-Tomuro
      @Shirotsune-Tomuro 2 ปีที่แล้ว

      the origin of your turret head is set up incorrectly. what is probably happening is that yur turret's default forward vector is the Y axis and not the X axis

  • @edpabrival
    @edpabrival 3 ปีที่แล้ว

    the sockets is not working for me

  • @BrennanStigall
    @BrennanStigall 3 ปีที่แล้ว

    Could I do this with an actual mannequin character so that the legs move when it rotates?

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

    Interesting!

  • @krazywulf1983
    @krazywulf1983 3 ปีที่แล้ว

    socketig dont show up for me after creating and saving

    • @krazywulf1983
      @krazywulf1983 3 ปีที่แล้ว

      Had To make sure that the base was parrented first so it was tab indented under base

  • @Thunder_Owl
    @Thunder_Owl 3 ปีที่แล้ว

    Quick question, with those particular nodes, will turret be working right upside down and sideways? Thank You.

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

      Hmm it will work at all orientations except probably not upside down...

  • @reilly2828
    @reilly2828 3 ปีที่แล้ว

    How can I make it slightly inaccurate so when I use faster projectiles it isn’t aimbot?

    • @turdle69420
      @turdle69420 3 ปีที่แล้ว

      make it so it fires at an angle less than 1.

    • @reilly2828
      @reilly2828 3 ปีที่แล้ว

      @@turdle69420 bruh then it wont hit at all

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

      You are rude for no reason.

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

      @@glatzigoblin wait was that In the program I thought he meant make it shoot at the ground?

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

    You are doing really good job, I'm really thankful 🙂
    I'm really trying to learn GTA V style Game for a long time. Now I hope I can find more interesting tutorial in your channel.
    For ue4 everyone make tutorial I couldn't find all together like ( weapon systems, cover system, vehicle and flying system, AI system ect...) Now I'm going to run thought your channel 😍 thank you so much
    When I have any doubts or any tutorial needed, can I ask ?

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

      Thanks, you can always ask

    • @mayuranrajakumaran109
      @mayuranrajakumaran109 4 ปีที่แล้ว

      Thank you so much :) my dreams will come true because of you 😊

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

    Please provide your discord. I have question on gun system tutorial.

    • @EugeneTVPlay
      @EugeneTVPlay 4 ปีที่แล้ว

      Can not find earlier provided discord account blindopoly#1003

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

    Thanks!

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

    Excellent ❤

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

    Love this! Might have missed it, but is there something for the damage? Currently it's a one-hit kill

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

      Make the projectile deal damage, and set the event onhit/anydamage on ur enemy/character blueprint. A basic tutorial should do the trick :)

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

    Why call the find the best target function every tick? Calling a loop every tick is like one of the worst things you can do performance vice. Why not just call it on begin overlap or something?

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

      you could make it only tick when a character is within a certain range of it, but once they're within a certain range it has to happen in tick so it updates every frame.

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

    epic tuto :D

  • @trpimirhorvat6252
    @trpimirhorvat6252 4 ปีที่แล้ว

    Do there need to be some changes if you are in third person mode. Btw great video

  • @Kitya-K
    @Kitya-K 4 ปีที่แล้ว +1

    Followed tutorial, accidentally made BRRRT
    I'm not disappointed

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

      Put the roll in the yaw and vise versa und you get your brrrrr :D

  • @vaanidel2117
    @vaanidel2117 3 ปีที่แล้ว

    Late as hell, but useful tutorial! Thanks!
    Side note, something I've been having a bit of trouble with
    I want to set the rotation of the "top" part with relative rotation, instead of world. I've seen people suggest using "inverse transform rotation" or "delta rotator", but neither one works for me with the find lookat rotation. Any suggestions?

    • @ReidsChannel
      @ReidsChannel  3 ปีที่แล้ว

      Why do you need to set the rotation of the top part with relative rotation?

  • @Sky-b2q
    @Sky-b2q 3 ปีที่แล้ว

    Thanks

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

    my UE doesnt have the ACTOR option under the type of variable selection. wtf.

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

    Is anyone else unable to set the time of last fire?

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

      I had a similar situation. in the function 'update fire' I had a typo for the section that checks the last time it was fired. basically instead of subtracting it, I had function call which said 'min'. I assuming I typed minus in the popup list and selected a 'Min' function instead of a '-' subtraction function.

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

    Awesome but only works for flat surfaces

  • @devshorts4184
    @devshorts4184 4 ปีที่แล้ว

    is this tutorial with blueprints or c++?

    • @ReidsChannel
      @ReidsChannel  4 ปีที่แล้ว

      blueprints

    • @devshorts4184
      @devshorts4184 4 ปีที่แล้ว

      @@ReidsChannel do you have other c++ tutorials like this? If not please make those, I am very curious

  • @I-Maser
    @I-Maser 3 ปีที่แล้ว +1

    Overall a good Tutorial but its very slow , and id add a short section at the beginning explaining how it works and showing of the Blueprints before making the step by step part.... so 7/10 , good job , really helped me

  • @hellatze
    @hellatze 3 ปีที่แล้ว

    timestamp 31:00

  • @svenrawandreloaded
    @svenrawandreloaded 3 ปีที่แล้ว

    looks good but very long, watching on 1.5x speed wish me luck boys

    • @levankantara
      @levankantara 3 ปีที่แล้ว

      I watched 1x and planning on reWatching 1.5x again

  • @abultimatetanksimulator6605
    @abultimatetanksimulator6605 3 ปีที่แล้ว

    can you help me please?

  • @SledgeMain19
    @SledgeMain19 4 ปีที่แล้ว

    ...

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

    wasted 30 minutes of my life on this tut. UE doesnt have that Actor variable option anymore

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

      RIght click - type "actor"... shows many types of actor!

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

    I've used this method to make my character auto shoot at targets but I can't use multiple fire modes at once. I made scene component for the mesh which bullets will spawn at its location at it worked perfectly. I added more scene components and duplicated the functions and used Sequuence node for each type of shooting I want but it won't trigger the Fire nodes I have. I changed the mesh inside each function to the scene component I wanted.drive.google.com/drive/folders/12tRItmuLNSYLggI6a9KVwBa02hc63cH9?usp=sharing