Attach BP Actor with scene root component & physics simulated skeletal mesh

Hi,

the thing I want to achieve:
I have several weapons in my game and they can be picked up and will get attached to the right hand. I have to adjust the gun alignment for every gun and I thought I’d do that by adding a scene component as highest in the gun hierarchy and make any adjustments there.

the problem:
the skeletal meshes are simulating physics (since I want to be able to drop the guns). If I turn off the physics in the BP panel (not in code), everything works fine with the new scene component. But when I turn them on in either the panel or with BP code, I cannot pick them up anymore. I am disabling physics directly before the attachment, but it also doesn’t work if I disable it right after the overlap event. Once the physics have been active, I can no longer attach the gun to the hand, it just remains on the ground, not moving at all as physics are now disabled.

I also tried reseting the simulated bodies before and after turning off physics and I also played around with the setting “Physics Update Transform Mode” to no avail.

Any ideas how I can get around this? Alternative would be to add a socket to the right hand for every gun in the game… Any hints are greatly appreciated!

One of the solutions - assign to root of weapon blueprint some static mesh, which is part of this weapon (for example - main part of wheapon), and use Physics Constraint component.

I can try using the magazine of the gun as the root - just have to check if the reloading anims will be affected, but great idea man!

I am usually attaching the sphere collision to one bone of the skeletal mesh as it kept felling apart once physics were simulated.

May be you need set the “Disable Collisions” flag in Physics Constraint.

1 Like

Hi. I recently had this problem and managed to solve it. Here is the link to my forum post an the solution:

1 Like