How To Add Weapon to Character in Unreal Engine 5 Quick Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ค. 2024
  • 🎮Learn to create a game in Unreal Engine 5: www.unfgames.com/action-game
    Want to learn Blueprints from scratch? Watch this: • Unreal Engine 5 Beginn...
    You will learn a quick way to attach any kind of weapon to a character in UE5 using Blueprints.
    Questions? Let us know in the comments!
    -------------------------------------------------------------------------------------------------------------
    🎓Learning Unreal Engine? Start here with complete tutorials: • Unreal Engine 5 Comple...
    🎭Are you creating a game in Unreal Engine? Join our community! / discord
    -------------------------------------------------------------------------------------------------------------
    Connect with us here:
    👦🏽Ram: bio.site/ramanand
    🤓Mao: bio.site/megamaomao
    👶🏼Guille: www.artstation.com/zorae
    -------------------------------------------------------------------------------------------------------------
    Get in contact with us here!
    www.unfgames.com/
    / unfgames
    / unfgames
    / unfgames
    / unfgames
    -------------------------------------------------------------------------------------------------------------
    AFFILIATE LINKS*
    Intro to World Building in Unreal Engine: www.wingfox.com/c/8505_32949_...
    *By making a purchase through any of our affiliate links, we receive a very small commission at no extra cost to you. This helps us on our mission to provide quality education to you. Thank you.
    Timestamps:
    0:00 Changing Weapon Pivot Point
    0:42 Creating the Weapon Blueprint
    1:17 Add Weapon socket to Skeletal Mesh
    2:30 Preview Weapon with the Socket
    3:20 Adding our Weapon to our Character
    5:10 Try it out!

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

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

    Hello!👋
    Want to access to all our Premium tutorials and exclusive content? Consider to become a Member to access all Members-Only videos: tinyurl.com/joinunfgames
    ❤️Want to support the channel? Here are some tutorials we recommend you to take: tinyurl.com/resourcesunf
    By purchasing any of those tutorials we will get a small commission at no extra cost for you! If you want to support the channel and level up your game dev skills this is a great way to do it! This helps us on our mission to provide high quality education to you for free!
    Remember you can get some awesome free and paid resources in our website www.unfgames.com/ so make sure you don't miss them!
    If you liked this video, subscribe for more! Comment below what kind of Tutorial you would like to see next!👇

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

      Great, that really helped a lot. And how to remove the weapon from the hands? Suppose I have several swords / guns / darts, how do I change them?

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

    Thanks for using a sword, rather than a gun, as an example! Just what I've needed.

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

      haha thanks! we like medieval fantasy games a lot lol

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

    You're my hero with these tutorials.

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

      Welcome!

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

    really helpful!!! thanks

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

    Thanks helped alot 👍

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

      No problem 👍

  • @user-kq4ce2zp6c
    @user-kq4ce2zp6c 9 หลายเดือนก่อน

    thanks for helping

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

    Genius. Thx à lot 🙏🙏

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

      welcome!

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

    Thank you for the tutorial.
    Could you please also tell what should we do when we just want to spawn the character with the socket for cutscenes? For animation in sequencer

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

      After you create the socket and save the skeleton asset, then the socket will be available every time you use the mesh, including in sequencer.

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

      @@unfgames Thank you

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

    This was an amazing tutorial! however I used the new manny with unreal 5.so movements got messed up.I thought i had to change collisions in mesh...but i changed it in sword bp..then it worked... Thank you once again!!!

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

      Thanks this helped

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

      thanks u a lot buddy ! this also works for the paragon characters

    • @TheGreatDaniad
      @TheGreatDaniad 7 หลายเดือนก่อน +1

      I have the same issue, how did you solve it exactly? sorry I am new

    • @keithwilcox5478
      @keithwilcox5478 5 หลายเดือนก่อน

      @@TheGreatDaniad those still needing to know, go to your weapon mesh, and disable collision.

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

    excelente. gracias.

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

    Thanks!

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

    Great tutorial! But how would you make it if the player got to choose their weapon from options in the beginning, so there would be multiple spawned weapon choices? Thank you.

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

      Perhaps for another tutorial 😁 you would need to put the weapon as a blueprint

  • @Malachism
    @Malachism 2 หลายเดือนก่อน +1

    What about doing this for a skeletal mesh that you're only using for a cinematic. Not a playable character.

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

    great tutorial, how do i make the sword not collide with the character then?

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

      remove the static mesh collision

  • @user-hw3rz3oc2b
    @user-hw3rz3oc2b ปีที่แล้ว

    Awesome vid I do have a question though
    My character uses two weapons at the same time is it possible for Get Socket Transform to have two names so that both weapons can be used?

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

      Yeah you can attach multiple components, just repeat the same operation and assign a different socket name

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

    I'm having a bit of an issue. I made my own sword asset and I'm finding movement kinda broken with my player due to the sword hitting against the legs. Any way to stop the player colliding with the held item?

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

      just remove the collision of the sword, you can later use collision channels to specify which objects you want to collide or not

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

    Thanks! But how do we make the character wrap his hand around the weapon, or just change how a character is animated with a weapon equipped overall?

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

      Yeah it depends on the animation

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

      What you're asking is governed by a node called blend pose by bool. The node has slots for two poses. One is true, the other is false. The false pose will of course be the default animation that plays. Just search up videos for "blend pose by bool".

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

    Nice, didn't hesitate to click here hahaha

  • @albincbabu7151
    @albincbabu7151 5 หลายเดือนก่อน

    How do we add damage to a character when using a sword ?

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

    can you do a weapon class system tutorial for ue5?

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

      That would be cool!

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

    I have a question, if we want the sword to physically interact with the scenery and with other swords using the physical animation component. Should we convert our weapon to skeletal mesh or something else ?

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

      I guess use collision?

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

      just use collision channels and triggers in the weapon blueprint class to specify the behavior of the weapon

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

    Thanks for this great tutorial, as always :D How can we remove the attached weapon?

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

      There is a function called Detach 😁

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

      @@unfgames Thank you! :)

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

    following this tutorial for some reason my camera also snaps to the weapon socket. Any ideas on how to fix this issue?

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

      Did you check the sword collision?

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

      @@unfgames Thanks that fixed the issue

  • @Lifeport-z
    @Lifeport-z 10 หลายเดือนก่อน

    Works in 5.2.1 only issue I am having is the camera wants to zoom in when I am looking at the sword for some reason

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

      Check the collision

    • @Lifeport-z
      @Lifeport-z 10 หลายเดือนก่อน

      @@unfgames thought I had disabled it already haha

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

    Everything works the sword actually looks great in the socket in hand however, apply this code to my event graph with UE5 Manny it breaks my movement controls completely. It's suddenly inversed and he goes in circles. This is what makes these tutorials so hard no one explains the setup as using any different mannequin seems to provide radically different results.

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

      Hi there, this tutorial was developed before Manny existed so there was no way for us to know how would this work with that asset.
      The problem you are experiencing is because of the collision of the meshes. As a quick fix you could change the collision preset of the sword to overlap Dynamic.

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

      @@unfgames YOOO THANK YOUU

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

    I followed the tutorial completely. but now when i move, the character moves in the wrong direction very fast! I noticed if i rotate the Pivot point on the sword mesh, then it also changes the direction the caracter moves, and moves very fast! How to fix this? Must sword meshed be created in a certain orientation in blender?

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

      Remove the sword collision, usually is that

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

    I've been trying to add a sword to my character and he was picking it up by the blade, turns out it was the pivot point, Thanks

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

      glad it worked out

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

    Is it true audio cues are gone in ue5?

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

      Eventually, Metasounds will replace them. But it will be a smooth transition I believe

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

    What if my original character doesnt have a BP? I dont need BP because I am doing cinematics not games.

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

      In sequencer you can attach the sword mesh to the socket in the same manner

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

      @@unfgames Ahh interesting thank you very much!

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

    I spent over an hour and half completely doing this and it won't work the object just floats in the air and when i stop playing I get an error saying AttachTo: '/Game/Maps/UEDPIE_0_CastleWorld.CastleWorld:PersistentLevel.BP_ThirdPersonCharacter_C_0.CollisionCylinder' root component cannot be attached to other components in the same actor. Aborting.

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

      can you share details on the Discord?

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

    where can i download the sword from?

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

      Sketchfab

  • @AA-du6hb
    @AA-du6hb 2 ปีที่แล้ว

    Hi i did exactly what u said. After adding weapon, character movement goes mad. goes back to normal when i remove the weapon. Pls help.

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

      That problem usually appears when two meshes attached are colliding with each other. You could make the one of them overlap or ignore the other one by changing the collision presets of the meshes

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

      I added directly after : attach actor to component -> another function: Ignore Actor when Moving .. and it works than fine.. Target = Capsule Component from Character and the Actor = return value from spawnactor .. and checkmark should ignore
      hope this helps

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

    I'm using a rifle for my character, although whenever I do preview asset its completely invisible, im so confused idk what to do

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

      Do you mean in the character previewer (persona) or in gameplay?

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

      @@unfgames sorry for late response turned out it was just really small, back on the video as im setting up guns and came back to learn how to move the pivot point, thanks!

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

      @@snazzysnoopy2882 no worries!

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

    I did everything you did I think and my character just decided to stand on the sword and levitate can you help me with it?

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

      Check the sword collision

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

    my sword is out the hand when the character is jumping, as I pointed that's because it attached to the skeleton quinn, but I swithed for my character and use her own skeleton socket, how can I fix it?

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

      Make sure the socket parent is the hand so the sword follows the movement.

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

      @UNF Games I made modular character inside blueprint window, if I move the sword inside the hand mesh( as a child) it stops animating

  • @abdelhaleemwaheed131
    @abdelhaleemwaheed131 9 วันที่ผ่านมา +1

    I got that warning when I use actor bp, (AttachTo: '/Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap.ThirdPersonMap:PersistentLevel.BP_ThirdPersonCharacter_C_0.CharacterMesh0' is not static (in blueprint "BP_ThirdPersonCharacter"), cannot attach '/Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap.ThirdPersonMap:PersistentLevel.NewBlueprint_C_0.DefaultSceneRoot' which is static to it. Aborting.) and the ited is not attached to the socked
    but works when I used pawn bp. Know why?

    • @origin3284
      @origin3284 7 วันที่ผ่านมา

      Same issue here, let me know if you find a fix

    • @origin3284
      @origin3284 7 วันที่ผ่านมา +1

      Figured it out, you have to change the weapon/whatever item you're using's DefaultSceneRoot to movable, this worked for me

    • @abdelhaleemwaheed131
      @abdelhaleemwaheed131 7 วันที่ผ่านมา +1

      @@origin3284 Dude, you are the best, it worked, thanks

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

    and how can i change the character animation when he equipe his weapons

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

      In this tutorial we cover the topic of animations: Animation Blueprint For Beginners Unreal Engine 5 Tutorial | Learn to Create a Playable Character
      th-cam.com/video/_oSQq7pKJtk/w-d-xo.html

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

      @@unfgames thks a lot

  • @MagicxReal-Studio
    @MagicxReal-Studio ปีที่แล้ว +1

    i did this and my character controlls are weird, camera changed to fps when standing still, and goes back to 3rd person when i try to move, but he's like hitting some invisible wall cause is being pushed backwards , what happened? only good news is he has his sword equipped !! ^_^ ( how do i fix the rest ahaha? )

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

      Same thing happened to me. I have no clue how to fix it

    • @MagicxReal-Studio
      @MagicxReal-Studio 3 หลายเดือนก่อน +1

      @@memeswiper disable weapon collision and will work fine , is because of that

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

      @@MagicxReal-Studio thank u 🙏

    • @MagicxReal-Studio
      @MagicxReal-Studio 3 หลายเดือนก่อน

      @@memeswiperwelcome 😊, also look for more recent tutorials, later you will learn how to ignore player collision and other objects like npc or certain enemies that you don’t want to damage 🤩

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

    My sword just spawns in the middle of my character and I have tried to troubleshoot it but I dont know what causes it. I tried changing positions of the sword, redoing sockets and chnging collisons but nothing works :/
    help please

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

      could you post it on the Discord? A screenshot would help

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

      Did you fix this?

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

      same issue, sword is spawning directly in the center of my character

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

    How do i make a grappling gun

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

      Do you mean a gun that will grapple an object and bring it near the player, or the other way around?

  • @samuel.......973
    @samuel.......973 5 หลายเดือนก่อน

    what to do if character doesnt have a blueprint

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

    I JUST ADD A SWORD TO MY ZOMBIE AND ITS FREAKING AWESOME I FEEL SO HAPPY THANK YOU !!!!!!!!!!

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

    How tf I can find the Modeling button, I do not have it in ue5

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

      make sure the plugin is enabled

  • @user-on3mu5qq8s
    @user-on3mu5qq8s 2 ปีที่แล้ว

    where can i find my staticmesh?

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

      Can download from Bridge or Sketchfab

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

    i dont know why but i tried it with a gun and it just flys its not in my hand and i did everything 1 to 1 can someone help me?

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

      Remove weapon collision

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

    It still isn't working for me for some reason

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

    unsure what i missed but the wepon is stationary once i press play

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

      Is it set to movable?

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

      @@unfgames no worries I managed to sort it.
      Sorry for not updating 😅

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

      @@devilsplague6666 How did you fix it? I'm running into the same issue. :)

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

    Sorry but it doesn't work, I followed everything but the weapon does not appear when I hit play. Can you help me please?

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

      maybe you can share it on discord with more details

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

      @@unfgames Thank you for your help, I made a mistake didn't put "snap to target" on location but did it for scale and rotation, I saw your video again and noticed my mistake.

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

    when i add my weapon it is too big what am i doing wrong

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

      You can scale the weapon mesh to fit your needs

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

      @@unfgames Thanks for the quick help, but when I try to scale the weapon I can't see it anymore

  • @COACH_KARSTEN_OPPINIONS-xs3xn
    @COACH_KARSTEN_OPPINIONS-xs3xn 14 วันที่ผ่านมา

    When I search for "pick up weapon in Unreal" and I see a video like this, that is 23:42 minutes long, I almost give up. My first thought is, that this simpel task must be very complex.

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

    I followed this tutorial and my character starts flying when I press play. I may have just learned how to make a rocket.

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

    So many stuff, where you all learned all this? It is impossible with TH-cam tutorials!

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

      long story, but maybe this can help you Unreal Engine 5 Complete Tutorials: th-cam.com/play/PLGEDpELN0zHDiStehu4bleZ7KVhOaGAUK.html

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

    Hmm doesn't work for me.

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

      check the collision of the sword

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

    useless tutorial