Unreal Engine - Turret Tutorial

Поделиться
HTML-код
  • Опубликовано: 1 фев 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

  • @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

  • @TriInfinity
    @TriInfinity 2 года назад +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!

  • @LolLol-ok4lr
    @LolLol-ok4lr 4 года назад +11

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

  • @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!

  • @davideblonda6159
    @davideblonda6159 Год назад

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

  • @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.

  • @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

  • @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

  • @TheWolverine1984
    @TheWolverine1984 3 года назад +1

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

  • @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

  • @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.

  • @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

  • @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

  • @renolisa7059
    @renolisa7059 4 года назад +1

    You AMAZING MAN! BIG THX for this tutorial!)

  • @TorQueMoD
    @TorQueMoD Год назад

    Awesome tutorial! Thanks so much for sharing :)

  • @michelsantos4236
    @michelsantos4236 3 года назад +1

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

  • @zeeraxa9671
    @zeeraxa9671 Год назад

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

  • @ManuelSanchez-gv3mq
    @ManuelSanchez-gv3mq 8 месяцев назад

    Thank you so much for this!

  • @matchstickpro
    @matchstickpro 4 года назад

    Amazing Tutorial, Thank you!

  • @ivan_e1775
    @ivan_e1775 4 месяца назад

    Very good tutorial, thx.

  • @MZONE3D
    @MZONE3D 3 года назад

    superb tutorial thanks for sharing

  • @cursedbishstudio
    @cursedbishstudio 3 года назад

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

  • @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!

  • @jaktwyford3931
    @jaktwyford3931 3 года назад

    So Helpful thanks!

  • @crunch3171
    @crunch3171 4 года назад +2

    Interesting!

  • @klovvin
    @klovvin Год назад

    Excellent ❤

  • @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

  • @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.

  • @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 ?

  • @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.

  • @BlackPowderGame
    @BlackPowderGame Год назад

    Thanks!

  • @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

  • @Kitya-K
    @Kitya-K 4 года назад +1

    Followed tutorial, accidentally made BRRRT
    I'm not disappointed

    • @TriInfinity
      @TriInfinity 2 года назад

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

  • @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 :)

  • @trpimirhorvat6252
    @trpimirhorvat6252 4 года назад

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

  • @ellisclark7016
    @ellisclark7016 Год назад +1

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

  • @psyco4452
    @psyco4452 2 года назад

    epic tuto :D

  • @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

  • @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?

  • @Sky-b2q
    @Sky-b2q 3 года назад

    Thanks

  • @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 2 года назад

      @@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.

  • @AsGLeagueStudios
    @AsGLeagueStudios 3 года назад

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

  • @davidtenembaun2630
    @davidtenembaun2630 3 года назад +1

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

  • @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

  • @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...

  • @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.

  • @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 2 года назад

      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

  • @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?

  • @Luminosus2012
    @Luminosus2012 2 года назад

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

  • @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

  • @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?

  • @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

  • @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

  • @BrennanStigall
    @BrennanStigall 3 года назад

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

  • @finesseandstyle
    @finesseandstyle 11 месяцев назад

    Awesome but only works for flat surfaces

  • @edpabrival
    @edpabrival 3 года назад

    the sockets is not working for me

  • @hellatze
    @hellatze 4 года назад

    timestamp 31:00

  • @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.

  • @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

  • @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

  • @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 года назад

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

  • @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!

  • @RobotNinj4
    @RobotNinj4 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