Thanks for your help! it definitely gets rid of him holding it but no longer drops it, is there a guide you know of that is inclusive of pickup and drop for physics based items? or do you think this is salvagable?
Okay, so I have the following working well, except, it lands immediately on the floor at the base of the player and through the ground a little bit, but we have issue 1 resolved, which was to remove it from player hands when dropped!
The settings works for what the character is currently ‘holding’ or at least look like he is, I’m not sure what to do about the last bit you mentioned I’m not well versed in UE, it’s my first game for context sorry!
From what I can tell the static mesh itself does have a collision box on it, hopefully below helps
ok so since your socket is set to none it attaches to the root of the character, you’d have to create a socket on the skeleton in front of the mesh to make it appear like its being held.
you physics still isnt set properly so its not working at all. try get
equippeditem->getrootcomponent->setsimulate physics true.
also double check all the collision since you’ve moved everything around
ah sorry it should be a of primitive type. too be honest all this should be done in the item itself anyway so i know its a bit of a pain but i’d recommend moving it all.
just create 2 functions in the itembase, pickup and drop and for testing purposes you can just use your interact interface call.
for now though since you’ve got a HardRef to the item you can just get the staticmesh and setphysicsenabled on that if you prefer.
also as ive said dont SetStaticMesh to null, you cant have collision on a null component
It creates the cube correctly and drops it but I can still see the weird cube from inside and I can only pick it up once the physics cube so I’m at a loss at this point.
Would it be too much to ask to recreate this somehow and show me how you did it? like you mentioned doing it all in the item itself?
Scrapping my initial logic, I followed this guide and seem to be getting closer to what I had in mind, although it’s too far from the player when picked up
the recreation cant have anything to do with the pickup/drop logic, check youre not spawning a duplicate or something in the item is having that effect.