UE5 Tutorial - Weapon Pickup and Drop

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

КОМЕНТАРІ • 42

  • @HolyHamGrenade
    @HolyHamGrenade Рік тому +3

    man you are underrated, I have watched so many tutorials for UE5, I love the way you go into depth explaining why things work the way they do

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

    This is really great man, laid out very clearly and I appreciate the thorough explanation of what each node and connection is doing.

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

    I tried every video. But this one worked. Thanks man

  • @tubble3058
    @tubble3058 3 місяці тому +2

    I have everything setup correctly and it doesnt work, it doesnt seem to be going through the is valid part

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

    I did everything the same but added a gun mesh and it doesn't work

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

    Please I am really needs your help. If you making this tutorial I will so grateful for you and supported you! Please..
    You can make a tutorial about a character from the ground picking up some weapons and using them. Different weapons sword, pistol and axe. And each weapon will have its own animation without the inventory system, but each weapon will be activated with buttons. For example the Q button of the gun and the R button of the ax and the T button of the Hammer to attack. Like in Bloodborne, dmc and dark souls

  • @SAMAR_178
    @SAMAR_178 6 місяців тому

    Hey I have a question Can you make a simple weapon switch video just like this??

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

    Works however when i duplicate the weapon blueprint and try to have two weapons on the project, only one of them works? How can I fix this?

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

      Update: Nevermind just saw your comment under the video.

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

    Amazing! It worked! I noticed however once the weapon is dropped, you can run away from it press the pick up button and the weapon teleports to your hand (although its far away). Is there anyway to fix this so you can only pick up the weapon when your close enough?

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

      And the end overlap event sets the PlayerRef as null? (doesn't have anything linked up?) That should ensure that if you're outside of the pickup area then it can't be picked up. If it still has the issue, you can set up a boolean variable (CanPickup or something similar) on the begin (true) and end (false) overlap, then have a branch before any of the code on the pickup code, that should remove any bugs with pickup too far away. Let me know how you get on :)

  • @lolaswift111
    @lolaswift111 11 місяців тому

    Detaching doesn't remove it from the player. so be ware!

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

    Hi jake im having a issue where whenever i go to pickup the actor its not a valid actor and wont continue the blueprint

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

      Are you making sure to cast to the blueprint that you're character is called, it may be different to the one in my video, so please check your specific character blueprint name. Also make sure to drag off "other actor", you may be going from "other component" or "overlapped actor"?

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

    Hi is it possible to hit anything with the weapon? EG a ball coming towards the screen for baseball? If so how can you do it as i'm stuck for a uni project?
    Thanks

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

      If you have the right animation, then it would just be having a ball come towards the bat with physics enabled, then if the bat has collision, then the ball would react accordingly

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

    Do you know why when I have multiple guns, i am able to pick up both however only one of the guns works when i shoot it? And what’s weird is it’s the most updated gun I edit meaning if gun 1 works while gun 2 doesn’t and then I go compile and save gun 2, gun 2 starts to work and shoot normally while gun 1 doesn’t work. So my code is getting confused thinking the most updated gun can work while the other can’t. Is this something to do with my shooting code?

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

      Have you disabled "Consume Input" on the shooting control input?

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

    tysm bro!!

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

    king

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

    Hi there, great video. I have a little problem, after completing the video my player mesh became invisible after starting the game and I don't know what to do any thoughts?

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

      I'm not sure exactly, might be an issue with collision or are you changing the players mesh or location at all?

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

      @@JakeBradfordCollege Only thing that I changed was the location because I using ragdoll physics for player death. Speaking of ragdoll, whenever death is triggered the mesh is visible but not visible when after respawning.

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

      @tmv9431 I have a feeling something may be conflicting in your code. I'd suggest looking at whatever code you have linked with your mesh. One thing with ragdoll that I have found, is that you need to reset the position of the mesh when disabling ragdoll.
      So, disable ragdoll > set character mesh to default values (usually 0, 0, -90 for me with default mannequin) > respawn. That may help you, unless the mesh actually disappears.
      Something to look at if the issue persists, is recreate the mesh disappearing, pause gameplay (not stop), select your character blueprint and go to your mesh component and see where it is in your world to find if it is the mesh location/material/visibility, etc.

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

    how can i activate physics? if i activate it in the viewport i get some errors

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

      I have another video that covers activating physics if you'd like to watch that

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

      @@JakeBradfordCollege hey. Can you pls send me the link of it?

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

      @@JakeBradfordCollege nvm. Thank you so much! You are my hero. Hope you will get a lot of attention :)

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

      @@Miraskede ua-cam.com/video/rJmk9U_PoyY/v-deo.html

  • @jeff-si5lg
    @jeff-si5lg Рік тому

    i cannot drop the item.

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

      Only thing I can think of is either; the detach node isn't linked properly, or the "Player Ref" is getting unset before you can actually drop the item. Without more info though I can't help much

    • @jeff-si5lg
      @jeff-si5lg Рік тому

      @@JakeBradfordCollege i made a springarm and a scene component, so i have a location, where i can attach the object.
      for attaching, i use the attach actor to component function inside of the item BP, where i have the scene component, as a ref, from my player ref.
      thats works fine.
      but when i want to detach it, it doesnt work.

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

      @jeff-si5lg best I can suggest is to find out if there is either; an issue with the logic (maybe the branch is going weird), or if it's an issue with something else.
      A good way to do this without much hassle is to put a "Print String" node in between the flow of code one at a time. If "Hello" shows, then the flow of code is fine, if it doesn't then the code isn't working as it should. You can also plug in things like "Player Ref" to see if that returns the name of the player blueprint or if it's blank, that would indicate an issue with that variable, etc.

    • @jeff-si5lg
      @jeff-si5lg Рік тому

      @@JakeBradfordCollege there is something wrong with my nodes.
      i cannot detach the mesh, which is now attached to my component. i can detach my component, with the attached mesh, but thats mean, i cannot pick up anything, because everything goes to the detached component

  • @afsin-sahin
    @afsin-sahin 2 місяці тому

    Nope. Its not working.

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

    I have done exactly the same steps as you in the video but it doesn't work. I press E to pick it up and nothing happens.

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

      Did you ensure to have the blueprint "Auto Receive Input" as Player 0, rather than Disabled?

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

      @@JakeBradfordCollege question about the dropping: i can just add physics to it and it should drop to the ground right?

    • @jarrettdement3245
      @jarrettdement3245 8 місяців тому

      @@JakeBradfordCollege Not OP, but I'm having the same issue. Originally, I didn't have "auto receive input" set to Player 0, but I've just done it and nothing is happening still.

  • @gabrielreyes251
    @gabrielreyes251 2 роки тому +1

    🦓