Moving the sword behind the character's back to his hand when attacking?

Hello there, there is a sword behind my character. And I want to move it to his hand when attacking. there is a method I tried in the example below. (I also tried with move component to) I think I’m making a mistake in the calculation. I would appreciate it if you help me, thanks.

Hey there @JeusWicked! So since your timeline is only moving the location of the weapon to the location it’s given while the timeline is running, you’ll still need to attach the weapon to the socket when the timeline is finished, but because everything can move in this time you’re going to get some unintended effects. It also seems like you’re getting the transform in world space but placing it into a relative context which will break things anyway.

I’d actually usually recommend going the animation route like this:

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

Thank you for your quick reply. That is not what I am talking about. I added it as a video. The weapon that appears in the character’s left hand comes to hand in some two-handed attacks. I want to make a smoother transition during the anim start. I hope I’ve made myself clear.

Still need to attach it to the new socket, so it doesn’t drift away after the timeline is done. Also, in the code snippet from first post, I’m not sure the sheathing part would work since the timeline isn’t in the execution path. The false path of branch should probably just goto reverse from end pin on timeline, then on complete attach to the appropriate socket. Otherwise, the mathy part looks fine.

I wonder if you could give me a small example?

No problem:

'Tis basically the same as yours, just with attachment on complete, and I used tlerp so sword also rotates