i am working on a system to throw and retrieve weapons that are being held, similar to Thor’s hammer or Kratos’s axe throw. When i hit the enemy and recall the axe it attaches to my hand properly and move with the character but when i hit anything other than an enemy like ground etc it returns to my hand initially but then doesn’t inherit the socket’s location/rotation. It stays in place while the character moves.
I have 2 functions ThrowAxe and RecallAxe.
In ThrowAxe , i first detach the axe from the player and if the enemy is hit then attach the axe to the enemy’s hit bone.
In RecallAxe, if enemy is hit then i detach the axe from enemy first and then attach the axe to the character hand otherwise i just attach it to the character hand.