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

Поділитися
Вставка
  • Опубліковано 23 лис 2024

КОМЕНТАРІ • 131

  • @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 2 роки тому

      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.

  • @Malachism
    @Malachism 6 місяців тому +2

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

  • @wildmillardz8934
    @wildmillardz8934 2 роки тому +12

    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 11 місяців тому +1

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

    • @keithwilcox5478
      @keithwilcox5478 9 місяців тому

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

  • @SecondSunofficial
    @SecondSunofficial Рік тому +2

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

    • @unfgames
      @unfgames  Рік тому

      remove the static mesh collision

  • @nasryahya1825
    @nasryahya1825 3 місяці тому

    Hi thanks for the great tutorial. I’ve followed all the steps in this video and added a weapon to the enemy AI and it was there in the skeletal mesh but it wasn’t there when I played the game. Any thoughts on solving this? Many thanks!

  • @canapex
    @canapex 2 місяці тому +1

    Thanks ! It works but when I try to play, my character doesn't move. I think my problem is with the link from "Event Begin Play". How to do if there's already one ?

    • @markusfw4447
      @markusfw4447 2 місяці тому +1

      Im new and wondered about this too, but i found out you can just use another event! Forexampel a Keyboard event when pressing 3. So the sword spawns in your hand when you press 3

  • @elisep1001
    @elisep1001 2 місяці тому

    Thanks for the help.

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

  • @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  Рік тому +1

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

  • @coryt93
    @coryt93 2 роки тому

    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 роки тому +2

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

  • @J3HST3R75
    @J3HST3R75 2 роки тому

    can you do a weapon class system tutorial for ue5?

    • @unfgames
      @unfgames  2 роки тому

      That would be cool!

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

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

  • @SolidRaiden2655
    @SolidRaiden2655 Рік тому +1

    Thanks helped alot 👍

  • @jeromeneupert4000
    @jeromeneupert4000 7 місяців тому

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

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

  • @keldelink971
    @keldelink971 2 роки тому +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 2 роки тому

      I guess use collision?

    • @maomaogamedev
      @maomaogamedev Рік тому

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

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

  • @Lifeport-z
    @Lifeport-z Рік тому

    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  Рік тому

      Check the collision

    • @Lifeport-z
      @Lifeport-z Рік тому

      @@unfgames thought I had disabled it already haha

  • @abdelhaleemwaheed131
    @abdelhaleemwaheed131 4 місяці тому +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 4 місяці тому

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

    • @origin3284
      @origin3284 4 місяці тому +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 4 місяці тому +1

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

  • @ih4286
    @ih4286 2 роки тому

    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  2 роки тому +1

      glad it worked out

  • @MagicxReal-Studio
    @MagicxReal-Studio 2 роки тому +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 7 місяців тому

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

    • @MagicxReal-Studio
      @MagicxReal-Studio 7 місяців тому +1

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

    • @memeswiper
      @memeswiper 7 місяців тому

      @@MagicxReal-Studio thank u 🙏

    • @MagicxReal-Studio
      @MagicxReal-Studio 7 місяців тому

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

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

  • @albincbabu7151
    @albincbabu7151 9 місяців тому

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

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

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

  • @kioly_ah
    @kioly_ah 2 роки тому

    really helpful!!! thanks

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

  • @DariusAndrei-d9b
    @DariusAndrei-d9b Рік тому

    thanks for helping

  • @Im_Whats
    @Im_Whats 6 місяців тому +1

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

  • @COACH_KARSTEN_OPPINIONS-xs3xn
    @COACH_KARSTEN_OPPINIONS-xs3xn 4 місяці тому

    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.

  • @zyk0413
    @zyk0413 2 роки тому

    Genius. Thx à lot 🙏🙏

  • @GAMINGAPOSTLEJ
    @GAMINGAPOSTLEJ Рік тому

    Nice, didn't hesitate to click here hahaha

  • @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 2 роки тому +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

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

  • @unimodels3d
    @unimodels3d Рік тому

    Thanks!

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

  • @samuel.......973
    @samuel.......973 9 місяців тому

    what to do if character doesnt have a blueprint

  • @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 2 роки тому

      Did you fix this?

    • @MasterYugiMoto
      @MasterYugiMoto Рік тому

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

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

  • @Don_Beto_ptr
    @Don_Beto_ptr 2 роки тому

    excelente. gracias.

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

  • @varadus9151
    @varadus9151 2 роки тому

    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  2 роки тому +1

      maybe you can share it on discord with more details

    • @varadus9151
      @varadus9151 2 роки тому

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

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

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

  • @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
      ua-cam.com/video/_oSQq7pKJtk/v-deo.html

    • @sajid2272
      @sajid2272 2 роки тому

      @@unfgames thks a lot

  • @thaddeusgigachaddeus2954
    @thaddeusgigachaddeus2954 Рік тому

    It still isn't working for me for some reason

  • @devilsplague6666
    @devilsplague6666 2 роки тому

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

    • @unfgames
      @unfgames  2 роки тому

      Is it set to movable?

    • @devilsplague6666
      @devilsplague6666 2 роки тому

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

    • @VengeanceGOD
      @VengeanceGOD Рік тому

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

  • @fritz8359
    @fritz8359 2 роки тому

    where can i download the sword from?

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

  • @albertomartin70
    @albertomartin70 2 роки тому

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

    • @unfgames
      @unfgames  2 роки тому

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

  • @빅댕댕
    @빅댕댕 2 роки тому

    where can i find my staticmesh?

    • @unfgames
      @unfgames  2 роки тому

      Can download from Bridge or Sketchfab

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

  • @MrShroombot
    @MrShroombot Рік тому

    Hmm doesn't work for me.

    • @unfgames
      @unfgames  Рік тому

      check the collision of the sword

  • @arturkozanowski1499
    @arturkozanowski1499 7 місяців тому

    useless tutorial