No video

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

  Рет қаралды 77,671

UNF Games

UNF Games

Күн бұрын

🎮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!

Пікірлер: 127
@unfgames
@unfgames 2 жыл бұрын
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 жыл бұрын
Thanks for using a sword, rather than a gun, as an example! Just what I've needed.
@unfgames
@unfgames 2 жыл бұрын
haha thanks! we like medieval fantasy games a lot lol
@SangHendrix
@SangHendrix 2 жыл бұрын
You're my hero with these tutorials.
@unfgames
@unfgames 2 жыл бұрын
Welcome!
@user-kq4ce2zp6c
@user-kq4ce2zp6c 10 ай бұрын
thanks for helping
@kioly_ah
@kioly_ah Жыл бұрын
really helpful!!! thanks
@unfgames
@unfgames Жыл бұрын
welcome!
@SolidRaiden2655
@SolidRaiden2655 11 ай бұрын
Thanks helped alot 👍
@unfgames
@unfgames 11 ай бұрын
No problem 👍
@nasryahya1825
@nasryahya1825 21 сағат бұрын
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!
@wildmillardz8934
@wildmillardz8934 2 жыл бұрын
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 жыл бұрын
Thanks this helped
@axelkarsten9828
@axelkarsten9828 2 жыл бұрын
thanks u a lot buddy ! this also works for the paragon characters
@TheGreatDaniad
@TheGreatDaniad 7 ай бұрын
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.
@zyk0413
@zyk0413 2 жыл бұрын
Genius. Thx à lot 🙏🙏
@unfgames
@unfgames 2 жыл бұрын
welcome!
@lossapote
@lossapote 2 жыл бұрын
excelente. gracias.
@unimodels3d
@unimodels3d Жыл бұрын
Thanks!
@unfgames
@unfgames Жыл бұрын
welcome!
@Malachism
@Malachism 3 ай бұрын
What about doing this for a skeletal mesh that you're only using for a cinematic. Not a playable character.
@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 жыл бұрын
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
@GAMINGAPOSTLEJ
@GAMINGAPOSTLEJ Жыл бұрын
Nice, didn't hesitate to click here hahaha
@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 Жыл бұрын
Perhaps for another tutorial 😁 you would need to put the weapon as a blueprint
@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
@albincbabu7151
@albincbabu7151 5 ай бұрын
How do we add damage to a character when using a sword ?
@Alistr2001
@Alistr2001 Жыл бұрын
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 жыл бұрын
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".
@laststep3533
@laststep3533 Жыл бұрын
Thanks for this great tutorial, as always :D How can we remove the attached weapon?
@unfgames
@unfgames Жыл бұрын
There is a function called Detach 😁
@laststep3533
@laststep3533 Жыл бұрын
@@unfgames Thank you! :)
@J3HST3R75
@J3HST3R75 Жыл бұрын
can you do a weapon class system tutorial for ue5?
@unfgames
@unfgames Жыл бұрын
That would be cool!
@keldelink971
@keldelink971 Жыл бұрын
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
@jeromeneupert4000
@jeromeneupert4000 4 ай бұрын
I JUST ADD A SWORD TO MY ZOMBIE AND ITS FREAKING AWESOME I FEEL SO HAPPY THANK YOU !!!!!!!!!!
@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
@iqbalmalik5380
@iqbalmalik5380 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 жыл бұрын
Did you check the sword collision?
@iqbalmalik5380
@iqbalmalik5380 2 жыл бұрын
@@unfgames Thanks that fixed the issue
@UnbeatenSpartan
@UnbeatenSpartan 2 жыл бұрын
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 жыл бұрын
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 Жыл бұрын
@@unfgames YOOO THANK YOUU
@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 Жыл бұрын
glad it worked out
@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
@samuel.......973
@samuel.......973 5 ай бұрын
what to do if character doesnt have a blueprint
@fritz8359
@fritz8359 2 жыл бұрын
where can i download the sword from?
@unfgames
@unfgames 2 жыл бұрын
Sketchfab
@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
@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?
@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
@rysone3173
@rysone3173 2 жыл бұрын
What if my original character doesnt have a BP? I dont need BP because I am doing cinematics not games.
@unfgames
@unfgames 2 жыл бұрын
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!
@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 kzbin.info/www/bejne/laC2gqRtpbB9qs0
@sajid2272
@sajid2272 2 жыл бұрын
@@unfgames thks a lot
@abdelhaleemwaheed131
@abdelhaleemwaheed131 24 күн бұрын
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 22 күн бұрын
Same issue here, let me know if you find a fix
@origin3284
@origin3284 22 күн бұрын
Figured it out, you have to change the weapon/whatever item you're using's DefaultSceneRoot to movable, this worked for me
@abdelhaleemwaheed131
@abdelhaleemwaheed131 22 күн бұрын
@@origin3284 Dude, you are the best, it worked, thanks
@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 Жыл бұрын
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
@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?
@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
@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
@MagicxReal-Studio
@MagicxReal-Studio Жыл бұрын
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 ай бұрын
@@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 🤩
@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!
@user-on3mu5qq8s
@user-on3mu5qq8s 2 жыл бұрын
where can i find my staticmesh?
@unfgames
@unfgames 2 жыл бұрын
Can download from Bridge or Sketchfab
@thaddeusgigachaddeus2954
@thaddeusgigachaddeus2954 Жыл бұрын
It still isn't working for me for some reason
@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
@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
@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. :)
@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
@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 Жыл бұрын
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.
@Im_Whats
@Im_Whats 3 ай бұрын
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 29 күн бұрын
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.
@unfgames
@unfgames 25 күн бұрын
Welcome to Game Development!
@COACH_KARSTEN_OPPINIONS-xs3xn
@COACH_KARSTEN_OPPINIONS-xs3xn 24 күн бұрын
@@unfgames LOL
@albertomartin70
@albertomartin70 Жыл бұрын
So many stuff, where you all learned all this? It is impossible with KZbin tutorials!
@unfgames
@unfgames Жыл бұрын
long story, but maybe this can help you Unreal Engine 5 Complete Tutorials: kzbin.info/aero/PLGEDpELN0zHDiStehu4bleZ7KVhOaGAUK
@MrShroombot
@MrShroombot Жыл бұрын
Hmm doesn't work for me.
@unfgames
@unfgames Жыл бұрын
check the collision of the sword
@arturkozanowski1499
@arturkozanowski1499 3 ай бұрын
useless tutorial
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 15 МЛН
Useful gadget for styling hair 🤩💖 #gadgets #hairstyle
00:20
FLIP FLOP Hacks
Рет қаралды 11 МЛН
How To Add Weapon SOCKETS in Unreal Engine 5
6:10
Buvesa Game Development
Рет қаралды 16 М.
10 Unreal Engine 5 PLUGINS I can't live without!
9:37
Cinecom.net
Рет қаралды 504 М.
How to import and use a custom 3D character in Unreal Engine 5
19:58
Virtus Learning Hub
Рет қаралды 99 М.
Equip/Unequip Weapon Tutorial Unreal Engine 5
11:09
Unreal University
Рет қаралды 32 М.
The Most Common Mistake Beginners Make in Unreal Engine | UE5
12:17
Ali Elzoheiry
Рет қаралды 102 М.
How to Shoot a Projectile in Unreal Engine 5
7:54
Gorka Games
Рет қаралды 80 М.
UNREAL ENGINE Attack Animations (Easy Tutorial)
17:03
ProductionCrate
Рет қаралды 90 М.