Attach/Detach static mesh component to/from socket
I'm trying to attach a static mesh component (weapon) to my character's skeletal mesh component's socket and then allow it to be detached, re-attached, re-detached, etc....
The problem is I can'r re-attach it a second time. Here's how it goes right now: - Attach weapon for first time, it attaches to socket. Perfect. - Detach weapon, it drops to the floor. Perfect. - Try to attach it again. It stays on floor. Not perfect.
It works ok if I don't set the Set Simulate Physics to TRUE when detaching the weapon. But, I don't want the weapon to be floating in mid-air, I want it to drop to the floor.
Here's the attach blueprint:
And, here's the Detach blueprint script:
You need to setup a way to turn simulate physics off once you have completed the detach otherwise after the detach happens it will remain as simulating physics and won't attach back to the socket normally. You may need to set it up as a BP so you can call a function on it to turn off simulate physics when you go to pick it up again.
answered Mar 21 '16 at 10:24 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here