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.