- Home /
Switching/Picking up items in a third-person game
How would I be able to switch items in a third person game (like picking up a sword/shield lying on the ground and automatically equipping it so I can use it, or picking up sword and putting the weapon you have equipped already on the ground)? Would I have to make different animations for each weapon in game, or is there someway to code it in...so its in my characters hand..? Help would be appreciated. Thanks!
Answer by Kith · Jun 26, 2011 at 01:04 AM
You can have two separate models (one for the weapon and one for the player). You can then just animate the player model normally, and parent the weapon gameObject to the model's hand when/where appropriate.
Answer by phatality123 · Jun 27, 2011 at 11:50 PM
When I parent it to the hand (had to parent it to its joint, since its just one object), the sword moves...weirdly. What I mean is that it doesn't floats right above his hand (even though in the scene view the sword is in his hand), and it rotates so when he runs it looks like he's slicing his head...Any way how to fix this, cause I want the item to move properly