I have created a simple BP that allows the player to walk over an object and pick it up. It simply snaps to the socket in his hand. Ive attached screens of the Bp. its a knife that I made into a BP itself. This all works fine but now I want to be able to press a key and have the knife detach and fall to the floor. I have tried using a key press but it seems as if input logic isnt being read from within the knife’s Blueprint. How would I detach the knife? Any help would be greatly appreciated.
Hey there. I’m actually doing something very similar and mine works just about perfect. But I think the issue is that your knife BP probably isn’t a “controller” bp and doesn’t have the ability to read keypresses. Not sure how to fix that, so what I’d do is actually set up the attach and detach through your player’s BP instead.
Cast to the overlapped knife and check that it’s an equippable item. If you press a key, send it to the socket you want and attach it. If you press the key again, remove it. You don’t need to press a key to attach it originally if you don’t want, but it might be useful if you have more items later on.
The issue I’m running into is finding the right rotation of the equipped item when it’s dropped. Primarily because I’m using a sort of “instance” of my held item and spawning in a new item when it’s dropped, in it’s place.
Good luck! If you need any more help with it, just ask. I’ve been debugging my pickup/drop/replace system for the last two days and I think it’s pretty solid now. Lol