Download

detach weapon from socket

Hi there!

I created two sockets for the character - one for the weapon during non-battle action, another one for weapon during the battle.
skeleton.PNG
In animation it looks like this
animation_view.PNG

Also I added blueprint nodes that allows me to display the weapon on default and when I switch to battle stance
46dc52b6d8b5ddfc200546b4944cedc931fa5012.png

By default character has a weapon on his back.
no_weapon_default.PNG

When I fire action to enter the battle mode it spawns weapon in another slot. However the weapon on the back left as is
battle_mode.PNG

Also when I switch non-battle mode the weapon left in the hand of the character too.
idle_mode.PNG

How to detach weapon from the socket? Or is there should be another approach for weapon switching?

Instead of spawning a new weapon when entering battle mode just attach the existing weapon to your hand socket.
When you switch back to non-battle you can attach it to the socket on the back again.

Regards

What do you mean by attach? In Blueprint? How to do that? Like this?

25f4c4741656b2fd4e05e8ff2052a0b0eb9d11c4.png

Yes that should work.
When you first spawn your “Sword Game BP” store the return value in a variable.
Use that as Target for the attach function and it lets you move your sword between your sockets easily. I use it myself.

Regards

Got it. Thanks!