Static Meshes not dropping once detached from socket?

I’m currently working on a simple weapons system that involves simple weapons comprised of a collision cube and a static mesh that attach to a socket on the player once equipped, and detach from the socket once dropped.

The issue I’m facing is that once the weapon is detached it just floats there at the point it was before detaching, whereas I’m trying to have it drop back to the ground as it should. I’ve tried enabling physics and gravity on the Static Meshes but that doesn’t seem to help, any ideas are appreciated. Thanks!

  1. enable “simulate physics” in your mesh properties in the bp
  2. set the collision to block all
  3. now in the event graph you will have to deactive the physics before you attach the mesh to the socket → set simulate physics and you will have to disable the collision → set collision enabled
  4. now when you detach the mesh you will have to active the physics and the collision again

Thats it :wink: Now it should work

Hmm, I had all of that aside from the ‘Block All’ Collisions, and it now works to an extent, but there are some issues I am having.
When picking up the weapon, sometimes the mesh will not attach correctly (depending on which weapon it is, due to different mesh sizes) and will instead fly about and end up at weird angles, sometimes flying off entirely. Any ideas on why this could be happening? The order of events when picking up a weapon is as follows -

Check if we already have weapon > Cast it correctly (All derive from a base weapon with no mesh) > Set physics on the mesh to ‘off’ > Set collision to ‘off’ >Set it as current weapon > Attach to Socket

As the physics and collision are being disabled before being attached it doesn’t make sense to me that having ‘Block All’ on is causing this strange issue when being equipped and attached. Any ideas?

Hmm strange → in my case it works perfectly. Take a look at this picture and check if you have made it like that (1=Attach; 2=Detach):

Aaaah, I was using ‘Set Actor Enable Collision’ instead of Set Collision Enabled, which seems to have been causing this issue. Alright that seems to be functioning a lot closer to what I need now, any further tweaks I’m sure I can figure out from here. Thank you very much, really helpful!