Unreal Engine 4 - Draw/Sheathe Weapon

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

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

  • @natecoet3291
    @natecoet3291 3 ปีที่แล้ว +20

    For those, who might have an issue, like I did, if your weapon offsets when you sheath it back, just set the sheath weapon's attach actor to component to "snap to target" my sword kept off setting when I would put it back, and this helped.
    These are great videos, since following them I have learned a lot. Thank you.

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

      THANNNNNNNNNNNNNNNNNNNNNNNKS

    • @natecoet3291
      @natecoet3291 3 ปีที่แล้ว

      @ggwillyy perfect :)

    • @noahdonald3848
      @noahdonald3848 3 ปีที่แล้ว

      instaBlaster...

    • @d-listgamers6183
      @d-listgamers6183 2 ปีที่แล้ว

      Thank you very much!

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

      The weapon just teleports to the ground for me. plz help

  • @Beardgames
    @Beardgames  3 ปีที่แล้ว +7

    ★For People Creating This For a Gun ★
    Follow the video exactly except you should have an animation of your character simply holding your weapon instead of the single frame animation we create at 2:00. When we blend in our 'weapon hold' animation at 9:30, use your animation of your character holding your weapon here, and instead of 'clavicle_r' and blend depth = 0. Put 'spine_01' and blend depth 0.
    If you don't understand what I'm talking about don't worry! Just follow the video exactly, I will show you the changes in the weapon shoot tutorial. Thanks guys!
    ★ For Creating Your Own Draw Weapon Animation ★
    For Creating an animation for the Mannequin I used the addon Mr.Mannequin tools. This addon was created by my good friend Jim Kroovy, he's an active member of our Team Beard discord and has his own TH-cam channel. You can find his channel here: https: //th-cam.com/channels/GYdARiaC-bWJNMWVwcWMMg.html
    When creating your animation...
    1) Import Weapon Onto Character
    2) Animate Around It
    3) You can actually attach your weapon to your mesh (Blender) by selecting a bone, then going into object mode, selecting your weapon, ctrl select your armature, then pressing ctrl + p, then selecting bone. This is a handy method if you want to see how it will look like with your characters movement.
    4) When importing back into Unreal only export the animation not the weapon. Make sure you select your characters skeleton so the animations can be used by your current character in Unreal.
    5) If your animation doesn't quite line up with your Unreal Weapon just adjust the socket position!
    Thanks for Watching and Let me Know if I can answer any of your questions :)!

    • @natecoet3291
      @natecoet3291 3 ปีที่แล้ว

      Following this my character doesn't revert back into idle position and stays as if he was holding his weapon, unless I make a jump.

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

      @@natecoet3291 Hey Nate! Yeah sorry I forgot to add a transition back. Just add the transition going back to your idle when weapon drawn --> NOT --> Plug in. Hope this helps :)

    • @TheParasone
      @TheParasone 3 ปีที่แล้ว

      When I bring in the mr mannequin in blender he will always be in t pose but as far as I have seen we would want the animation to happen during idle animation. How do I do that? Is there an idle animation pose in the blender add on ? Couldn’t find it, mine is always in t pose.

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      @@TheParasone if you're importing animations into blender you'll have to import the file as an FBX rather then open it as a project. That being said the keyframes are all done frame by frame so tweaking pre existing animations is a bit rough. Sorry I can't be of more help but I hope this can be of some use :)

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

    Downloading the 800MB project folder for the 2kb animation file because I'm too lazy to learn animation in blender 😎

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

    it was at this point that I got stuck in my studies, because I had some doubts. As you alternate in an animation of armed / desermed attack
    and how to add other animation instances for example:
    1 instance with shield sword.
    1 instance with greatsword
    1 instance with arc.
    another point how to make the character automatically store the weapon after a time without use.
    and migrating to an instance where the character uses magic.

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

      Hey dude, with this setup you can do all the things you've just said with ease :) You can isolate certain areas of the skeleton just like we did in this video. If you want the weapon to sheath after a few seconds, off the left click you just need a delay to sheath it with a condition. Hard to explain everything over message but as we've just setup the basic movement + added on animations (the draw weapon). To change the attack style you just change the animation we add onto the character :)

  • @haseeb9090
    @haseeb9090 3 ปีที่แล้ว

    Omg! Thank you so much for this series.

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      No problem at all! Character attack tutorial coming next which really puts it all together, looks so cool! Glad its helping you out :D

  • @TheGhos1Face
    @TheGhos1Face 3 ปีที่แล้ว

    Missed your vids man! Amazing as always

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

      Haha thank you man, I'm slowly implementing early access so give it a week and the video uploads will be more consistent :)

  • @CorruptedYogi
    @CorruptedYogi 3 ปีที่แล้ว

    Nice one. Can’t wait for another video.

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      Thanks so much dude, coming at you asap!

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

    works but once drawn and unsheath about 5-10 times my weapon is moving away from the socket. did i mess something up?

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

    but, thank you very much for sharing your knowledge, it is helping me a lot!

  • @wolfiedgr8t
    @wolfiedgr8t 3 ปีที่แล้ว

    Thanks Ben, excellent stuff 👍

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      My name is Jon :D

    • @henrytubritt9869
      @henrytubritt9869 3 ปีที่แล้ว

      @@Beardgames Sorry Jon. I get confused, I don't even know what day it is because of Christmas holidays ;) and I should have known your name as I follow you on facebook. Sorry once again and keep up the good work.

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      @@henrytubritt9869 Haha no problem at all, was funny to read. Hope you had a great xmas! Let me know if there's anyway I can help :)

    • @henrytubritt9869
      @henrytubritt9869 3 ปีที่แล้ว

      @@Beardgames Thanks Jon, Merry Christmas and hope you have a great new year.

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

    So ive been at this for over an hour, just this vid (embarrassing i know) I cant get the animation to play, ive followed all steps over and over and even deleted it all just to reget the same result, however, the sword does move from the place on my players back, it just swings around as if it doesnt actually have a proper place to be. Any help would be appreciated, your content has gotten me this far and Im hoping i can keep going. Really ran into a blockade here. (EDIT: Could locomotion be affecting other animations? Im not sure) edit: snap to target makes the sword move from hand to back, but no animation is playing

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

    You are amazing!! I do have one question for you or someone else on this page who might know, all works great I can Draw weapon then sheath weapon but for some reason once it is sheathed once it will not let me draw my weapon again. Do you know how this can be fixed?

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

    Thank you so much

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

    Did every thing that you said and checked twice but my animation montage just won’t play

  • @Restart-Gaming
    @Restart-Gaming 2 ปีที่แล้ว

    How would I make this work with spawning weapons in hand? Like if I have my bow,axe gun etc in hotbar when number keyboard click spawns item in hand weapon food etc then use mouse to draw and fire? do you have something like that in your videos? Hope to hear from you soon.

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

    Thanks for your videos man, they've been helping me a lot. I like your style of presentation a lot.
    I got this to work, however, in my game I'm implementing dual wielding.
    I have it working where I can draw/sheathe both weapons. But, on my offhand is not setup right.
    Is there an example of how this works when you want to blend the animations of both arms, or one arm, depending on what is equipped?
    I tried to blend it into my Idle/Runwithweapon, and in my charBP, on the last step where you branch to set weaponequipped I just ran another branch after that to set weapon2equipped, duplicating all of the other nodes leading up to it, and correcting them

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

      Hey Cobra glad you're enjoying the content! So yeah you could have a draw weapon animation for both weapons which is blended in from the clavicle only. So just add another array element for both clavicle's then give them full control by messing with the blend number (can't remember exact name but it's in the details). Hope this helps :)

    • @Soco3kgt
      @Soco3kgt 3 ปีที่แล้ว

      Would you mind sharing how you set it up for dual wielding?

    • @cobrathecobra3398
      @cobrathecobra3398 3 ปีที่แล้ว

      @@Soco3kgt Basically, what I did was watch his video twice, once for each hand.
      I still don't have the animation blending exactly right. I'm a noob, my ability to explain how to do anything is going to be minimal

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

    Sir Pls Make a Tutorial i need to add one more weapon and switch weapons Pls Pls Pls

  • @Skyleneee
    @Skyleneee 3 ปีที่แล้ว

    I've been scratching my head all day trying to figure out why i couldn't get the sword to properly switch sockets during the "draw" and "sheathe" sword events, but I finally found out why.
    I've followed another channel on doing a crafting menu and I have an "item parent" with all the blueprints in it and "child actors" of the "item parent" for all the ingredients and pickable items and somehow when I tried to get an object reference to put in the "target" in attachactortocomponent it always came back with "accessed none" errors.
    With other words what I was trying to do was directly reference to the actor I picked up and since it was a child actor it caused the reference to fail somehow.
    My fix was to get a reference to the "item parent" and under the inputs in the detail panel I added the weapon bp that I wanted to draw, plugged the "Item parent" variable to a "get all actors of class" and plugged the array into the target.
    Hope this can help someone too! :D

  • @wilfreddavis1335
    @wilfreddavis1335 3 ปีที่แล้ว

    is there a way i can get my character to draw two daggers i tried and only one would attach to hand even with separate blueprints

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

    love ti really nice but litle bit fast

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

    Hi man, nice video! I just have one problem. I can't seem to find the anim notify draw/sheathe weapon node on my animation BP, even though I was able to successfully add the notify frame on my animation montages. Any help would be appreciated, thanks.

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

      Hey Sean! So yeah just make sure everything's compiled, and make sure the animation is linked to the correct skeleton and animation blueprint, you can do this by jumping into the animation then in the top right click on the animation blueprint. If it's the wrong anim BP you'll need to make sure you can use the animation on the anim bp/skeleton you're after, can do this by changing the mesh or retargetting the anim if it's not there. Good luck my friend :)

    • @seango584
      @seango584 3 ปีที่แล้ว

      @@Beardgames You're a life saver, I was able to get it working! I really appreciate the help :)

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

      @@seango584 hey no problem, thanks for supporting the channel :)

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

      @@Beardgames i compiled everything and it still wont show up ik this is a old tutorial but i need help

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

    Thank you very much for these videos.
    2 questions my "equip weapon montage" will only play once when I press the left mouse button while the "disarm montage" will play as often as I press the right mouse button. What did I miss?
    Also I am having trouble with the position of the weapon in the characters hand. on the skeletal mesh it is in the hand, but when I equip it it is aligned out side the characters hand. What did I miss?
    Thanks for your help.

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

      No problem at all my friend thanks for watching them and supporting me :) make sure you're reseting your "do once" node on the equip weapon, and for the offset make sure you've on your attach to component to you've got the correct settings in terms of position, rotation and scale. Let me know how you get on!

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

      @@Beardgames Changed the "attach to Component" location and rotation to "snap to Target" solved the weapon location.
      Fixed the disarm bow set weapon to false. That was not allowing the equip to reset for the next use.
      Thanks again.

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      @@jykatl9460 sorted 😊👍

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

    Can you help me pliz. After exiting the game mode an error in the "Branch", which is in the ThirdPerson_AnimBP
    and is responsible for "WeaponDrawn"

  • @lilmochi7833
    @lilmochi7833 3 ปีที่แล้ว

    Having a hard time importing draw animation To Unreal (I'm a complete beginner) any help?

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

    Everything is working but for some reason my characters arm starts with the "holding" closed fist and when I "equip" a weapon the hand is open lol
    I've tried changing a few things in the anim blends and changing the names of the slots so my full body anims don't play weirdly.
    With all those bugs sorted and working again, I'm down to just the hand being in a backwards sort of state with equip and unequip anims.

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

    Love your tutorials, I am actually using these right now in a project game that I building for my kid. One question do you know how to add in rotation for the swords? I wanted them to rotate while they are waiting in the level to be picked up. I know how to add rotation so the swords spin 360 but when I picked up the sword and it equipped to the character back it continued to spin. I did some more code and got it to stop spinning if it is equipped and even fixed its rotation so that the sword would be laying correctly when attached. However, all the other swords would stop rotating too since they were children of the main sword bp.
    I then tried to put the code on the children individually but kept running into issues. I finally found a way to make it work sort of. I added a second static mesh and had that one be the one to rotate after some checks were done. The real sword would be hidden in the game until picked up and equipped whereas the fake would then be set as hidden which would stop the rotation while the real sword would become visible. This worked fine, however, when I would go switch to another sword the sword would switch fine but the visibility of the fake sword would stay hidden and switch back allowing the rotation to resume.
    I am not the best at coding and with my limited understanding, this messy solution was the only thing I could come up with. If you could share your thoughts that would be appreciated. Thanks again for all the tutorials I plan to review more of your stuff here soon.

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

      Instead of having it set up as a child you can try duplicating it and making an event on pickup that destroys the actor and spawns the non spinning one!

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

    i cant return the weapon, the animation plays but the weapon is still in my right hand, eugh

  • @dev_mauricio_unreal
    @dev_mauricio_unreal 3 ปีที่แล้ว

    likeeeeee i love you man

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      haha I gotchu bro

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

    In Unreal Engine 5 don't working.
    Character don't play anim montage, but sword smoothly drawing and sheathing. Character moving without draw sword anim montage...

  • @shaaanly
    @shaaanly 3 ปีที่แล้ว

    can you put draw sword animation download please?

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

    when I hit the button to sheathe my weapon, it sheathes it, but then pulls it out again, does anyone know how to fix this?

  • @thebaronskitchen540
    @thebaronskitchen540 3 ปีที่แล้ว

    Nobody gonna address the big yellow WARNING in the Anim BP?

  • @artiodainlard
    @artiodainlard 3 ปีที่แล้ว

    I've added a new 1d space blend for the weapon drawn variable so that when the weapon is equipped the character has battle animations, but when sheathe the weapon he's still in the battle animation, do you know where I might have gone wrong?

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      Hey artio! Check your animation blueprint and make sure your animations have a transition from battle back to normal, I think it will be something as simple as that :)

  • @DrSciencex
    @DrSciencex 3 ปีที่แล้ว

    I did this but on my anim montage right click wouldn't allow me to add rep notify. I tried by doing it from the animations themselves and was able to add rep notify that way but regardless it didn't work. Not only did it not work but I was also unable to switch my weapon to my hand as armed. Any suggestions?

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      Hey! So yeah it's a bit glitchy depending where you click. Picture all the words on the left of the box as rows. You need to make sure you're right clicking in line with the notify row. Let me know if this works for ya :)

  • @CrouchingOVME
    @CrouchingOVME 3 ปีที่แล้ว

    Hey! It's me again! Haha
    First off, amazing video! Very clear to follow and you explained things well! So glad I found your channel!
    I've got a slight (Actually major as it's the whole point of the video) problem. My animation just doesn't want to work, I followed your video to the T and I've also been through it 4 times now to make sure I didn't miss anything. But it just doesn't work and I can't for the life of me figure it out!
    I'm currently in top-down game mode and I made the obvious adjustments of making the 'cast' to go to my top-down rather than 3rd person like you use. Everything is named correctly and my socket names are all correct.
    I know it's not your video because everything else you've shown me has worked so far! It's 100% something I've done. Any chance of some assistance when you have time?
    Thanks!

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

      Hey amigo! Haha glad you're enjoying the content. So it's hard for me to recommend a tip but what you need to do is narrow down where the problem is. You can do this using print strings and other debug methods, first make sure the animation plays on your character by previewing the animation, then try run this animation in your blueprint via a simple keypress, try get the animation playing using an event, then if it plays it means something is wrong with the BP functionality and you can narrow down where the problem is via print strings. Check out this video (watch all of it) before doing anymore blueprinting I think it will really help you :D Good luck my friend!

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

      @@Beardgames So I tried what you suggested and I BELIEVE I've narrowed it down to the Top Down blueprints, the animation plays fine, and I got it working fine with a left mouse click
      I'm pulling my hair out with it but I'm determined to figure it out! Currently on a 12 hour night shift so got plenty of time to figure it out😅
      Thanks again for your help!

  • @twiggy_SR
    @twiggy_SR 3 ปีที่แล้ว

    for some reason, when im idle it attaches to players hand correctly, but when walking or sprints its now floating next to him? i beg mr BeardGames PLS respond

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

      Make sure the socket is attached to the correct bone, and make sure when attaching your weapon you send to location and rotation, don't use "keep world" if your animation is causing issues :)

    • @twiggy_SR
      @twiggy_SR 3 ปีที่แล้ว

      @@Beardgames ahh ok, and last question. I have a double jump animation mechanic attached to "Setting 'Speed' (use in 1D blend space)" but i can see you attach the "get current accel" code to that. this is what it looks like i.imgur.com/YZRiKpt.png is there any way to i guess, re route it so both work? would really help ty

  • @jonathanodonnell3831
    @jonathanodonnell3831 3 ปีที่แล้ว

    thanks for the video man. I got an issue where when I draw the weapon it see saws on the back a bit and doesn't do the animation or go to characters hand

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      Play around with your attach to component settings. Can always snap to target to get it accurate :)

    • @jonathanodonnell3831
      @jonathanodonnell3831 3 ปีที่แล้ว

      @@Beardgames thanks man. I added another socket to the hand and it snaps to the hand now

  • @kevlargames1860
    @kevlargames1860 3 ปีที่แล้ว

    I did everything with no errors but for some reason the weapon doesnt attach itself to the hand when I trigger the animation. Any help?

    • @kevlargames1860
      @kevlargames1860 3 ปีที่แล้ว

      Never mind. I added the notify in the animation itself instead of in the montage

  • @mauriciosilva1631
    @mauriciosilva1631 3 ปีที่แล้ว

    about this tutorial, how could I apply this same logic of equipping and unequipping the weapon but instead of doing this inside the third person do this in the actor of the weapon?I want to do it this way because I created some state machines and saved some variables in them where I want to pull the character's poses according to the type of weapon

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      Hey Mauricio, for changing the state of the character based on his weapon I'd still do this in the character BP. Have you checked out my marketplace asset? It's got all the weapon functionality where your state changes depending which weapon you have equipped based on an ENUM :) if you can spare the money to purchase it id really recommend it as it sounds exactly what you're looking for! But if you're not keen you should have your changing state functionality in your character :) let me know how you get on!

    • @mauriciosilva1631
      @mauriciosilva1631 3 ปีที่แล้ว

      @@Beardgames I have no money at the moment and the dollar is 6 times more expensive here in my country, but I put the situation in discord

    • @mauriciosilva1631
      @mauriciosilva1631 3 ปีที่แล้ว

      I put the situation and marked you there

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      @@mauriciosilva1631 No problem my friend :) I'm busy at the moment but will take a look when I can

  • @LJ-pn3em
    @LJ-pn3em 2 ปีที่แล้ว

    how do you get the ue4 mannequin into blender

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

      I use a blender add-on called Mr Mannequin tools made by my friend Jim Kroovy :)

    • @LJ-pn3em
      @LJ-pn3em 2 ปีที่แล้ว

      @@Beardgames Thanks :)

  • @Apollyon47
    @Apollyon47 3 ปีที่แล้ว

    i follow the pick up and this and the BP is the same, but i cant pick any weapon or equip it ?

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      Sorry to hear that ruby. Have you got your pickup weapon working first?

    • @Apollyon47
      @Apollyon47 3 ปีที่แล้ว

      @@Beardgames actually no, since i just want the equip and unequi[p so i go here right away.( i just want to know where did you get the actor equipped thing so i go back and follow that tutorial the pick up video)

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      @@Apollyon47 So in the previous tutorial when we picked up the weapon we created a reference to it. If you're not picking up the weapon simply get a reference to the weapon you're using. If it's already in your character blueprint just ctrl drag in the static mesh from the left :)

  • @semmert
    @semmert 3 ปีที่แล้ว

    I'm unable to add animation notify at 5:30. Any ideas why?

    • @semmert
      @semmert 3 ปีที่แล้ว

      I think I got it. I think WHERE you right click makes a difference.

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      @@semmert yes sir, I should have mentioned it but you need to right click along the notify row :)

  • @putrapasande8226
    @putrapasande8226 3 ปีที่แล้ว

    idk, why i didnt have add anim notify?

    • @Beardgames
      @Beardgames  3 ปีที่แล้ว

      What's the timestamp my friend

    • @putrapasande8226
      @putrapasande8226 3 ปีที่แล้ว

      @@Beardgames alrdy fix , but thanks anyway, that notify sign in other skeleton

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

    my character dont play the anim montage :( he take the weapon and put it back but without animation^^

    • @VaennoX
      @VaennoX 3 ปีที่แล้ว

      nvm, i think i find the problem, is a problem with the animation i have, i try it with another one and it works^^

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

    is there anyway i can contact you for help!!

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

      Hey Brandon unfortunately I'm insanely busy so I don't have enough time to get round to helping everyone. If you're looking for some general guidance one of my patreon rewards is some 1 on 1 assistance where I can answer some of your questions and point you in the right direction 🙂