I'm currently a student in a video game school, in Game Design, speciality Level Design. I'm bad at programming so I follow every of your video to learn how to code on Unreal Engine. I can't thank you enough for all the good stuff you're uploading, you're a gold mine. Keep up the amazing work!
If your weapon is a static mesh make sure to set the collision preset to noCollision or else you will experience weird camera behavior. Thanks for the video.
Thank you so much for this comment! Took me awhile to figure out why my camera and controls were behaving absolutely bonkers when I picked up an object, you saved me! Setting the mesh to NoCollision did the trick. If you still need the object to have collision when not holding it like I did you can use Matt's Blueprint Interface tutorial to guide you along communicating between blueprints, this allowed me to change the Collision Enabled (or any other variables) in the appropriate meshes when interacting with the object. Great tutorials!
Even as a seasoned programmer (moved over to UE about 6 months back) this tutorial (just doing blueprints in UE for now till I get more familiar with the engine) was AMAZING! The joy of FINALLY having my character holding something lol!
Bro I hate blueprints. They take up so much space on the screen. There's such a low density of information. And with programming there's a much higher density of information and you can easily see the execution flow.
That's fair enough, I have 8 years professionally of C++ (5 as a consultant ) and I still like Blueprints for prototyping, so easy to change stuff around, although I agree the mile wide code can get tiresome! 😅
One vital part of the video that would've really helped out before doing all the animation stuffs is putting a download link for the animation and going over how to use that animation for the applied character. I'm spending over an hour just trying to figure out how to import and put an animation before even getting started with the preview animation segment of the tutorial
So I'm a student for a Digital Arts College currently in a Videogame Programming Major and ever since i started taking UE4 classes, i always looked upon you as my guidance, now im in my Capstone project, and this was one of the things the team and i really wanted to do. but we couldn't find tutorials on it that were as cohesive as yours, Thank you lots, Matt. your tutorials are amazing and because of them, its what pushes college students like us forward.
This has been a helpful video from Matt Aspland. Again.., very helpful video as I have found, but Matt Aspland I'm going to watch the whole video. You can choose a different way, but I'm going to be doing it this way
Hello sir, you are the best RUclipsr to follow. I work on a game, but I have a problem. I did not know how to make a method of striking for a specific weapon, for example, I also have a stick, an ax, the use of which is different. As you know, I would like to know a method of striking with a stick that is different from the method of striking with an ax. Can you make a video explaining this, I do not think it is It will be difficult for you, sir
Hello, I made this tutorial on UE5 now. I didn't see where we put the hitting animation so it can Actually work - Displaying the animation when we click left mouse button??... 🙄🤔 Although, great tutorials! really helps me, I love them! 🤩😁
I started with the FirstPerson Example file, if i follow your excellent Tutorial my weapon ends up spawning not in the Hand of the player and it only rotates when turning, not when looking up an down. In the Preview of positioning the socket everything looks fine
Hi Matt, one question . What is the difference between this method of Attaching the Weapon or this one for example : In the Character Blueprint we simply add Skeletal Mesh Component, assign the Weapon there, and on the details Panel in the SOCKET section, to assign it there ? Is it the same or something is different ? I hope you will what I'm saying :) thanks man, and keep up your good work .
That's my own inquiry also. I'm actually using the method you describe within the character blueprint. I'm just adding the sword as a static mesh and it works just fine by attaching it to a preexisting socket. I don't understand what's the benefit of this process. It would probably be useful to know. Having said that, it is just great to have these tutorial videos for free.
Boss I follow every video you put out keep up the good work. Question, I followed all steps on attachment, the gun snapped to the character but it's still stiff why my character moves?? Any suggestion
What I mean by the snap part is, I placed the gun in the static mesh and had to position it in there ( cause it was on yhe ground when you hut play and would move with the character across the ground) so I position it in the static mesh to where it look like it's near my hand. On the 3rd person Skelton attachment I made weapon under the (r) hand and did all the steps with the correct name. The gun mesh would animate right when I preview but when I play it won't connect to my character....... Now I do want to mention my character is a MetaHuman attached character to the skin of the 3rd person.( I'm not sure if that's causing the problem
Hello!!! You explained how to create a socket to attach a weapon to the character’s hand. I was wondering if you could explain (or possibly make a video on) how to grab things from the floor in third person with it attached to the hand. Also, how can the item be released. Thank you!!!
Not an expert but look up physical animations, used in things like climbing sytems, you give a place for your character to grab, it will generate the animation to reach toward it. Then maybe an anim notifier or something when you make contact with the item, or after a second delay giving time to reach toward it, then regular attach system like in the video. Ive never used or tried any of this but worth a look.
So, I go to try and preview with specific animations, however the ones I have do not show up, only the normal animations that UE gives you, so I cant preview it...and by extention, I'd assume I wont be able to use it later down the line either If anyone knows how to fix this, please let me know...
What if you have many weapons of different sizes and not all of them match the socket position? Is there any better way than keeping "socket offset" for every weapon, so when you spawn it, you can move it to right position? I would also keep scale multiplier or something like that, could be useful when you have characters with different sizes to scale the weapon accordingly.
Great point yeah, I imagine you'd probably want to do more fine tuning of the positions of the weapons inside of their respective blueprints. So you could have two guns in different positions in their blueprints, so that they can be placed in the same socket position. Hope that makes sense!
I'm still new to this and might not have any idea what im talking about but 5:47 looks like the white ball is where the socket would be so if you have different weapons you would just move the mesh so the socket position is where you want instead of moving the socket in the hand
So I followed this, but I used a very rudimentary, custom “sword” object that I created in blender, and it works fine (I have a “sword” in my mannequin’s hand) but there’s definitely something wrong. I feel like it has something to do with the collision on the “sword” because when I try to walk, I get really glitchy skippy movements as if I’m being repelled away from the direction of the hand my “sword” is in. I know it’s due to the sword because if I break the blueprint wires to stop the sword from spawning, then I can move normally. I know my static sword mesh has collision, but I never did anything to create that (I literally just imported the .fbx and then went straight to the blueprint portion of this video because the mannequin in UE5 has a “weapon_r” socket by default). Any help would be greatly appreciated because if I’m going to start work on a hack n slash project (and make my own weapons from scratch), I kind of need a sword that doesn’t teleport my character 10 feet to the left when I try to walk forward.
Fixed it for now (I have no clue if this will cause problems in the future, I need to figure out some tests to run). Basically in the BP for my sword (where the mesh and actor are) I just disabled the mesh collision (Collision Presets set to NoCollision).
@@tevildo9383 You absolute legend, I had the same problem and your solution worked for me as well, must be some weird interaction between them "bumping" into each other, well done!
So I am using the enhanced input system and when I connect this to the sequence for some reason it messes up my players movement. Any Idea what could be causing it?
Matt, quick question. Is there a way to close the character's fist over the weapon? I have done so in the skeleton, but it doesn't seem to xfer to the UE4 Manny.
How do you prevent the weapon from clipping through the character on certain animations? I considered updating the rotation on overlap, but for some reason it seems like this event never fires while it's socketed.
if we use live retargeting on metahumans, then weapons get attached to the source skeletal mesh, any idea how we can attach to metahuman instead, btw im using Flexible combat system with metahuman
I'm using UE5 and the sword doesn't show up as a skeletal mesh. Any idea why? I added it to my project. I can view the mesh in my browser and tried using 'Use Selected Asset from Content Browser' with the SK_Blade_BlackKnight selected. I could select SM_Blunt_BoneShardMace but not that specific sword.
Im using UE5 and its not playing the animation whenever I click my mouse? is there something I missed or need to do because I set the animation it just doesnt trigger after clicking?
How to attach a 2 handed weapon to the character? with my animations its attached to the right hand, which moves correctly with the sword but the left hand is slightly of the sword, how to fix that?
I have the same problem with this code as with your code for pick up and drop item.....without the item in my hand everything ist normal but when i got the item my character is always walking sideways. While crouching it is working ...i really don´t know what the f... is going on
I click a button to equip my certain weapon (instead of event begin play) and it doesnt replicate towards other clients, can you help me with this problem?
2 года назад
And how would you go about simply throwing the object and then picking it up on the ground? sticking to the socket again?
Yup. You can also hide the sword and spawn a new mesh on the ground. That way if the player triggers with the collision of that sword you can pick it up again. That way you reenable the sword. There are a lot of ways to do it. You can also do it with line tracing.
How do I attach f.e. a camcorder that´s already attached to the players hand to his head when equipping it with the hand still on the camcorder? Do I have to animate all animations new like walking, sprinting etc. or is there a better way?
I imagine the easiest way will be to probably use separate animations for this, and maybe even have a widget come up on screen when you want to look through the camcorder. Physical animations might also be something good to look into
Can someone help me understand the benefits of doing it this way? I'm failing to see why unreal does it like this. It seems like a really long way of doing something simple. I come from unity and there we can simply edit the skeleton itself and attach it there (basically we can stop after the previewing section). This also means you aren't *forced* to spend resources spawning assets which can be nice depending on what game you have (like if you know you won't mix weapons for different character types).
Thank you. I have a problem. Everything worked as far as attaching the weapon, but somehow once I spawn it and try to move, something is pushing me backwards off of my floor Edit: Never mind. @Nehemiah Kimble is a saviour
I'm currently a student in a video game school, in Game Design, speciality Level Design. I'm bad at programming so I follow every of your video to learn how to code on Unreal Engine. I can't thank you enough for all the good stuff you're uploading, you're a gold mine. Keep up the amazing work!
That's awesome to hear bro, thanks so much for your support! I wish you all the best with school! :)
buas?
If your weapon is a static mesh make sure to set the collision preset to noCollision or else you will experience weird camera behavior. Thanks for the video.
Thankyou ♥
Thank you so much for this comment! Took me awhile to figure out why my camera and controls were behaving absolutely bonkers when I picked up an object, you saved me! Setting the mesh to NoCollision did the trick. If you still need the object to have collision when not holding it like I did you can use Matt's Blueprint Interface tutorial to guide you along communicating between blueprints, this allowed me to change the Collision Enabled (or any other variables) in the appropriate meshes when interacting with the object. Great tutorials!
Woot! You're my hero
was just about to comment this. it kept launching me into the wall lol
is this why my character is hopping around ahen i pick it up lol
Even as a seasoned programmer (moved over to UE about 6 months back) this tutorial (just doing blueprints in UE for now till I get more familiar with the engine) was AMAZING! The joy of FINALLY having my character holding something lol!
Bro I hate blueprints. They take up so much space on the screen. There's such a low density of information. And with programming there's a much higher density of information and you can easily see the execution flow.
That's fair enough, I have 8 years professionally of C++ (5 as a consultant ) and I still like Blueprints for prototyping, so easy to change stuff around, although I agree the mile wide code can get tiresome! 😅
One vital part of the video that would've really helped out before doing all the animation stuffs is putting a download link for the animation and going over how to use that animation for the applied character. I'm spending over an hour just trying to figure out how to import and put an animation before even getting started with the preview animation segment of the tutorial
So I'm a student for a Digital Arts College currently in a Videogame Programming Major and ever since i started taking UE4 classes, i always looked upon you as my guidance, now im in my Capstone project, and this was one of the things the team and i really wanted to do. but we couldn't find tutorials on it that were as cohesive as yours, Thank you lots, Matt. your tutorials are amazing and because of them, its what pushes college students like us forward.
That’s amazing to hear! Super happy for you, and glad I could help you all out.
Wishing you all the best for your project and future endeavours!
You have no idea how helpful you are, and the fact that it's free! You're doing great things, please keep up these amazingly awesome tutorials!
thanks!
nice! i was able to attach a static mesh hair with this tutorial
This has been a helpful video from Matt Aspland. Again.., very helpful video as I have found, but Matt Aspland
I'm going to watch the whole video. You can choose a different way, but I'm going to be doing it this way
Always thankful for you and others for making these tutorials for free. Merry Christmas :)
Much appreciated dude, always happy to help Merry Christmas :)
I bought you a monster energy drink at the patreon. I hope you enjoy. :) Keep up the good work, man.
Thanks a lot bro! Wishing you all the best :)
Hello sir, you are the best RUclipsr to follow. I work on a game, but I have a problem. I did not know how to make a method of striking for a specific weapon, for example, I also have a stick, an ax, the use of which is different. As you know, I would like to know a method of striking with a stick that is different from the method of striking with an ax. Can you make a video explaining this, I do not think it is It will be difficult for you, sir
That's very useful, in many ways. It's similar to how blender's 'Parent & Child' relationship works. Cool
Absolutely!
This is the clearest tutorial I've ever seen in my life. Thanks!
I've been waiting for this one, Thanks again Matt, keep up the good work you living legend.
I was trying to figure it out few days ago and you made a video on it thanks😁
Video Request: Creating an inventory and equipment slots & Equipping and using items from your inventory
i like to see that
Pretty amazing! Would be sweet if you could do a full sword weapon playlist/video. Like have it sheathed, unsheathe and then this. Would be great ;)
Video was straight to the point compared to other videos Ive watched, grate vid
These videos have been absolutely wonderful. I was wondering if you could do something where you go over making collision for the weapon.
Thanks!!! I was looking for this for so long. I'm so glad that I discovered your channel before really starting unreal!!
Thanks for all your content, you have helped me a lot.
Channel members when? I would like to support you a little that way
Thanks a lot man, always happy to help!
And I have a Patreon page set up if that’s good for you? Thanks again! :)
www.patreon.com/mattaspland
Hello, I made this tutorial on UE5 now.
I didn't see where we put the hitting animation so it can Actually work - Displaying
the animation when we click left mouse button??... 🙄🤔
Although, great tutorials! really helps me, I love them! 🤩😁
This channel deserves way more attention, you're amazing.
Thanks a lot man!
could you please link a download for the retargeted animations matt? Thank you!
Could you make a tutorial for picking up a item and that item becomes your follower . That or it’s able to project a ui menu
Can u make a video on how to create gravity becoz if i add new pawns or chacrecters they fly in air
You have to enable physics simulation for those actors.
I started with the FirstPerson Example file, if i follow your excellent Tutorial my weapon ends up spawning not in the Hand of the player and it only rotates when turning, not when looking up an down. In the Preview of positioning the socket everything looks fine
yeah same here
Aw I found the solution... turned out I needed to use the FirstPersonMesh not the Mesh (CharacterMesh0) in the BP.
Hi Matt, one question . What is the difference between this method of Attaching the Weapon or this one for example :
In the Character Blueprint we simply add Skeletal Mesh Component, assign the Weapon there, and on the details Panel in the SOCKET section, to assign it there ? Is it the same or something is different ? I hope you will what I'm saying :) thanks man, and keep up your good work .
That's my own inquiry also.
I'm actually using the method you describe within the character blueprint. I'm just adding the sword as a static mesh and it works just fine by attaching it to a preexisting socket.
I don't understand what's the benefit of this process. It would probably be useful to know.
Having said that, it is just great to have these tutorial videos for free.
@@hocestbellumchannel This allows you to make a pick up system, Matt made another tutorial that depends on this.
for some reason its only attaching once. but then when i drop it i cant re pick it up! any suggestions?? thanks love the tuts
where's the retargeted animations? I'm having trouble getting the animations, could you please link it?
BIG THANK !!!!!!!!!!!!! man
Oh my gosh lol I literally about to make a game with this
Perfect haha
Boss I follow every video you put out keep up the good work. Question, I followed all steps on attachment, the gun snapped to the character but it's still stiff why my character moves?? Any suggestion
What I mean by the snap part is, I placed the gun in the static mesh and had to position it in there ( cause it was on yhe ground when you hut play and would move with the character across the ground) so I position it in the static mesh to where it look like it's near my hand. On the 3rd person Skelton attachment I made weapon under the (r) hand and did all the steps with the correct name. The gun mesh would animate right when I preview but when I play it won't connect to my character....... Now I do want to mention my character is a MetaHuman attached character to the skin of the 3rd person.( I'm not sure if that's causing the problem
Hello!!! You explained how to create a socket to attach a weapon to the character’s hand. I was wondering if you could explain (or possibly make a video on) how to grab things from the floor in third person with it attached to the hand. Also, how can the item be released. Thank you!!!
Not an expert but look up physical animations, used in things like climbing sytems, you give a place for your character to grab, it will generate the animation to reach toward it. Then maybe an anim notifier or something when you make contact with the item, or after a second delay giving time to reach toward it, then regular attach system like in the video. Ive never used or tried any of this but worth a look.
Could you create a tutorial on how to retartget animations from mixamo to the ue4 skeleton?
Did they removed the animations from the asset? Many people including me cant find the animations after importing the asset.
So, I go to try and preview with specific animations, however the ones I have do not show up, only the normal animations that UE gives you, so I cant preview it...and by extention, I'd assume I wont be able to use it later down the line either
If anyone knows how to fix this, please let me know...
What if you have many weapons of different sizes and not all of them match the socket position? Is there any better way than keeping "socket offset" for every weapon, so when you spawn it, you can move it to right position? I would also keep scale multiplier or something like that, could be useful when you have characters with different sizes to scale the weapon accordingly.
Great point yeah, I imagine you'd probably want to do more fine tuning of the positions of the weapons inside of their respective blueprints. So you could have two guns in different positions in their blueprints, so that they can be placed in the same socket position. Hope that makes sense!
I'm still new to this and might not have any idea what im talking about but 5:47 looks like the white ball is where the socket would be so if you have different weapons you would just move the mesh so the socket position is where you want instead of moving the socket in the hand
can you import a blueprint instead of mesh? i have a torch with fire particles, can i import that? 5:38
So I followed this, but I used a very rudimentary, custom “sword” object that I created in blender, and it works fine (I have a “sword” in my mannequin’s hand) but there’s definitely something wrong. I feel like it has something to do with the collision on the “sword” because when I try to walk, I get really glitchy skippy movements as if I’m being repelled away from the direction of the hand my “sword” is in. I know it’s due to the sword because if I break the blueprint wires to stop the sword from spawning, then I can move normally.
I know my static sword mesh has collision, but I never did anything to create that (I literally just imported the .fbx and then went straight to the blueprint portion of this video because the mannequin in UE5 has a “weapon_r” socket by default).
Any help would be greatly appreciated because if I’m going to start work on a hack n slash project (and make my own weapons from scratch), I kind of need a sword that doesn’t teleport my character 10 feet to the left when I try to walk forward.
Fixed it for now (I have no clue if this will cause problems in the future, I need to figure out some tests to run). Basically in the BP for my sword (where the mesh and actor are) I just disabled the mesh collision (Collision Presets set to NoCollision).
@@tevildo9383 You absolute legend, I had the same problem and your solution worked for me as well, must be some weird interaction between them "bumping" into each other, well done!
Omg, thank you. I;'ve been fiddling with my collision for hours and this saved my life and my mascara. Lmao
tysm this works
So I am using the enhanced input system and when I connect this to the sequence for some reason it messes up my players movement. Any Idea what could be causing it?
Matt, quick question. Is there a way to close the character's fist over the weapon? I have done so in the skeleton, but it doesn't seem to xfer to the UE4 Manny.
I made a ragdoll weapon pickup, but the object is T posing in the player hand socket. Is there a way to make it ragdoll while in the players hand?
where do i get the sword and sheild slash aniamtion pack
hi is there any way to use 2 soket because I have a assault gun and my left hand don't stick to the barel
my weapon's origin point is on the blade tip.. How can we change it to be on the sword handle ?
i got left and right hand snapped to my body, but how i can turn it off while reloading? is there any way?
and what if i want to have many different weapons sword axe spear etc do i have to rotate and scale every weapon like that to fit in the socket ?
How do you prevent the weapon from clipping through the character on certain animations? I considered updating the rotation on overlap, but for some reason it seems like this event never fires while it's socketed.
if we use live retargeting on metahumans, then weapons get attached to the source skeletal mesh, any idea how we can attach to metahuman instead, btw im using Flexible combat system with metahuman
What if I have two swords that are a static mesh? Specifically twinblades
What if your weapon doesn't show up in the mesh dropdown?
Hi.
At 3:09 you use a sword attack animation.
How to get it?
will i be able to make a pickup system for this?
if i want to make animations based on this ue4 mannequin , its better to make a new bone for the weapon right?
I'm using UE5 and the sword doesn't show up as a skeletal mesh. Any idea why? I added it to my project. I can view the mesh in my browser and tried using 'Use Selected Asset from Content Browser' with the SK_Blade_BlackKnight selected. I could select SM_Blunt_BoneShardMace but not that specific sword.
hi matt, what if the weapon is a seperate blueprint? thx
Does this still work in 5.2? Instead of it spawning in the position I set it in the socket it spawns between my player's legs.
nice bro nice ❤️
Thanks 🔥
Im using UE5 and its not playing the animation whenever I click my mouse? is there something I missed or need to do because I set the animation it just doesnt trigger after clicking?
How to attach a 2 handed weapon to the character? with my animations its attached to the right hand, which moves correctly with the sword but the left hand is slightly of the sword, how to fix that?
I have the same problem with this code as with your code for pick up and drop item.....without the item in my hand everything ist normal but when i got the item my character is always walking sideways. While crouching it is working ...i really don´t know what the f... is going on
So if I was doin' sword and gun how would I added both ?
after i attach the sword to actor, the character movement changes when i play. it is moving sidewards. how to fix
will this work for first person as well?
I click a button to equip my certain weapon (instead of event begin play) and it doesnt replicate towards other clients, can you help me with this problem?
And how would you go about simply throwing the object and then picking it up on the ground? sticking to the socket again?
Yup. You can also hide the sword and spawn a new mesh on the ground. That way if the player triggers with the collision of that sword you can pick it up again. That way you reenable the sword. There are a lot of ways to do it. You can also do it with line tracing.
You can attach and detach from sockets using nodes in this video whenever you need to :)
How do I attach f.e. a camcorder that´s already attached to the players hand to his head when equipping it with the hand still on the camcorder? Do I have to animate all animations new like walking, sprinting etc. or is there a better way?
I try to implement a feature similar to outlast with the camcorder (for better understanding)
I imagine the easiest way will be to probably use separate animations for this, and maybe even have a widget come up on screen when you want to look through the camcorder. Physical animations might also be something good to look into
I have no idea why but when I try using the swords from that same pack the swords are gigantic and no matter how i try to shrink them they dont fit :c
I've got everything working but how can i now do the animation ?
did u ever figure this out
it wont let me move the preview asset
ok i see now hes not moving the weapon, but is there a way to not move the socket? if you want multiple different weapons?
um wheres the download anim?
Can someone help me understand the benefits of doing it this way? I'm failing to see why unreal does it like this. It seems like a really long way of doing something simple. I come from unity and there we can simply edit the skeleton itself and attach it there (basically we can stop after the previewing section). This also means you aren't *forced* to spend resources spawning assets which can be nice depending on what game you have (like if you know you won't mix weapons for different character types).
My item went UUUUUUPPPP to the space when I picked it up XDDDDDDDDDDDDDDDDDD
WHY NOBODY MAKE THIS WITH A UE5 CHARACTER OR WITH A METAHUMAN
i think you are lying.. the sword is there i can clearly see it :)
And later: ...Detach...Destroy...
( The eternal problems of the engine... 😑)
Thank you.
I have a problem. Everything worked as far as attaching the weapon, but somehow once I spawn it and try to move, something is pushing me backwards off of my floor
Edit: Never mind. @Nehemiah Kimble is a saviour