I made it so that I could take the object in my hands ( according to this guide https://www.youtube.com/watch?v=v5D30Xn9GGc ) and I would like to be able to move this object to a certain place. How to do it?
I didnât watch the tutorial youâve sent all the way but at some point I saw the âDestroy Actorâ node came into play. If the actor that seems to be âpicked upâ is just virtual and not actually there in reality, you would need to use the âSpawn Actorâ node to place it in your scene again. And how you want to handle the placing mechanism is all about you, but if you want some suggestions on that too, you could use line traces that detect where the player is looking at, or use collision boxes to deterime when the player gets inside the dropping area if the actor will go into a slot anyway. And there are many more approaches as well just for this mechanic!
The problem is that I do not know how to remove the object from my hands(
By using the âDestroy Componentâ node
So if I destroy this component, I wonât be able to pick up other objects.
No of course you can! If you face any additional issues, provide how you handle picking up and resetting mechanism so I can continue helping you in those parts as well
Most likely, I misunderstood you (but hereâs how I did it to take the item out of my hands
, and in this case I canât take another item).
You see this part of the code isnât very related to the picking up part so can you share these in your next reply:
- The blueprint code of your picking up mechanism
- All the related parts to that code, for example if thereâs a variable included in that logic, also send the screenshots of the parts where itâs declared
- A video demonstrating the issue
Iâm sorry that Iâm so stupid, but even now I donât really know what exactly you need to throw off, so Iâll throw off everything related to this action(
)
Okay so it seems like youâre destroying the item as a whole once the obtaining event is triggered, and you fix itâs static mesh to the playerâs mesh to have the illusion of it being picked up, just like in the tutorial youâve sent! Now, your initial problem was how to place it back, right? Iâve explained how in my first post, and then explained how you can remove that static mesh after your follow up question. Moving on with your current problem, all those are working and you can place that item back on the ground, but you canât pick it up again, is that right? If so, it might be because of the lack of the collision sphere for your newly spawned actor.
If your issue doesnât get resolved with this, or my assumption is wrong, please follow up by sharing these:
- If youâre now able to remove the item that is attached to the playerâs mesh after youâve picked it up or not
- If youâve set the things Iâve suggested about the placement mechanic correctly or not
- A screen recording of the game as you reproduce the issue youâre having
(I watched the video youâve sent again, I see itâs just dependent on overlapping so what youâve sent earlier was indeed all the parts related to picking up )
I sent this to you to show how I understood your explanations above, but clearly wrong because it only works once(
âIâm not sure if you can continue communicating with me, but since Iâm new to Unreal, I donât always understand what you mean. When I asked how to remove the object from my hands, you answered: âDestroy the componentâ. I sent you a screenshot to show how I understood your answer, but then I noticed that it was not working correctly. I didnât know how to properly install this âdestruction componentâ. That was my problemâI donât understand how to properly remove an object from my hands.â
Can you expand on that? Does it not remove the item from your hands? Or does it successfully removes the item but this time you canât pick another item up again?
Also, how do you handle resetting the item from your hands and placing it back on the ground, did you implement my approach from my initial reply? Or do you have multiple items in your scene?
And a screen recording of your game as you play it where you show the issue would be very helpful.
2024-09-14 18-51-02.mkv (13.9 MB)
In this video, I showed how I added the âdestruction componentâ and what a problem I have because of it.
Could you convert that to mp4? I canât open it unfortunately
Oh I see. I could have understood that from your screenshot youâve sent earlier but watching your video (this one doesnât play but the private one) made me look for the issue there specifically, and I noticed something after looking a little bit closer. Itâs because youâve plugged the wrong object into the target pin of the âDestroy Componentâ node. Plug in the output pin of your function that detects the object that needs to be picked up in there instead
Yep