Yeah, I think maybe you should have two explicit states on your character (or on the sword, I'm not sure what makes more sense): holding sword and not holding sword (if the state's on the sword, then held or not held).
You can only apply force to the sword when holding sword is true. After throwing, holding is false. It's true again when the player collides with the sword. However, you should give a brief window for the player and sword's respective hitboxes to separate before detecting a collision.
But I really like that idea for a special ability or something.
I did take your state ideas and it works.
For your "The sword could end up in a place that you can’t zip to and retrieve" issue, I was thinking of adding a button that just summons the sword back to you if you lose it/throw it in a tough spot.
A summon button makes a lot of sense.
Were you thinking that the sword would fly back in your hand, or more of a teleport thing? Maybe I'm jumping too far ahead.
I was thinking teleport. The sword flying towards him probably wouldn't gel with the whole boy not strong enough to pull the sword towards him thing.
Oh duh, gotta be consistent of course!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.