How To Pick Up And Drop Items | Unity Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024
  • Subscribe & Like for more Content like this.
    -------------------------------------------
    TH-cam : / gunzzyt
    twitch : / gunzz___

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

  • @alexplaytop
    @alexplaytop 6 หลายเดือนก่อน +1

    Hmmm... I made it without TriggerStay, just logically pickUp opposite dropDown func.

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

    i have a problem i copy the code *not all of it* and its making me have an error cs1026 can you help me?

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

    Hi hope you read and answer this but i am having a problem when i drop a gun i have multiple guns in my game and when i press the drop button all of them teleport to me and 1 more problem when i look or even stand on a gun like a pistol and press the equip button it equips some other gun not even close to me.

  • @kingtyrant18
    @kingtyrant18 6 หลายเดือนก่อน

    Can you post script in chat

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

    if you cant grab the object just remove (if.tags == " player")

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

    hey, great video. I have a small problem. my gun falls through the floor even though the floor has a collider. Can you please help me?

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

      Make sure your gun has a Mesh Collider on it. And that you have checked Convex [ ✅️ ]

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

      @@GunzzYT thanks, have a nice day

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

    Hi, I also have some problems 😅.
    For some reason the Gun doesn't inherit the WeaponParent's rotation, only the position. Regarding the position, when I press the key the gun just teleports to the parent and falls

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

      But that PickUp script (from your other video) works flawlessly. It's my go-to option if nothing else works. Quite simple but effective 😎

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

      make sure you have a rigidbody on the Gun... And for the rotation i cant tell whats wrong (i need to see ur code) but make sure u haven't missed anything in the code, compare it.

  • @onlyrxtro7059
    @onlyrxtro7059 3 หลายเดือนก่อน

    Is it a way to make it to where only I can pick it up and nobody else able to touch it even when I drop it

  • @haeqallz19
    @haeqallz19 8 หลายเดือนก่อน

    it work well for my project but if i add another object, it will only interact the first object. Can anyone help me on this? I want to make it interact with two object as the purpose of it is to replace the first object to second object, more like replacing battery to its place. Need help asapp

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

    I made the same with a pliers only problem is that the character takes the Pliers that lies in the scene. Man do you know whats wrong? Please help me😭😭😭

  • @youratrucker20
    @youratrucker20 10 หลายเดือนก่อน

    Your code does not support unity anymore it only supports Unity Engine 5

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

    Hey bro thanks for the video , but i have a small probleme pls help when i drop the gun it dropes only on one side and it’s the camera side when the game starts i want when i click drop it drops on the the side the player stand

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

    I have a problem the pick up & drop script works but then the shooting script doesn't work and there's "an object reference not set to an instance of an object" and I dont know how to make gun shoot after picking it up :(((

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

    I had a problem where the object would not go into the parent but chat gpt fixed it

  • @GagePlayz5423
    @GagePlayz5423 8 หลายเดือนก่อน

    when I drop my gun it goes though the floor

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

    Very good tutorial. but some problems. but i used chatgpt to fix them. Thank you.

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

    thx for ur help, i had some problems , but chatgpt fixed it 4 me (i dont know about scripting or something ^^)

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

      glad i could help👍

  • @Maku-ek4nz
    @Maku-ek4nz ปีที่แล้ว

    Can you make a video that shows how to do it with the raycast system in order to look-pick up ?

  • @hh5559
    @hh5559 10 หลายเดือนก่อน

    Is it possible for this to be done but for a Third Person controller?

    • @GunzzYT
      @GunzzYT  10 หลายเดือนก่อน

      Yes, this script should also work on a third person controller. Just make sure that the third person controller is tagged as the player.

    • @hh5559
      @hh5559 10 หลายเดือนก่อน

      Got it@@GunzzYT
      Also, for multiple items in a single scene that I want picked up, do I need to create differe nt scripts for each individual item or just use the same one for all?

    • @GunzzYT
      @GunzzYT  10 หลายเดือนก่อน

      @@hh5559 i will be making a new video about this topic ( how to pick up multiple items) kinda like a inventory system. Stay tuned!

    • @hh5559
      @hh5559 10 หลายเดือนก่อน

      @@GunzzYT actually I was more on about having multiple pickable items in a single scene that you want to be picked up

  • @sneakysquid-tt3ef
    @sneakysquid-tt3ef ปีที่แล้ว

    can i have the code please

  • @THeCOde0168
    @THeCOde0168 11 หลายเดือนก่อน

    thank you so much😊it is a very helpful..💯

  • @LazyLion-making-game-alone
    @LazyLion-making-game-alone 4 หลายเดือนก่อน

    nice man!

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

    Works almost perfectly I'm having an issue where whenever I continuosly pick up and drop an item it starts to stretch out

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

    doesn't work anymore

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

    Where can I get your terrain?

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

    Hey! I have checked some videos on your channel and they have been really helpful! I am beginner in unity and learning right now. I would love to be in contact with you, do you have any social medias?