- Home /
whats the best way to pickup a weapon
Hello I am wondering what is the best way to script a weapon pick up.
Depends a lot on your game. I made a 3rd-person brawler last year, and I did it using I$$anonymous$$-adjusted animations, and transform parenting. This allowed the animation to smoothly reach down to whatever it was it was picking up, and raise it neatly.
Thank you for your comment that is a good idea because i tried having a whole lot of Weapons as children of the player but all that happend was i could pick it up but the object on the ground stayed there. $$anonymous$$ine is a FPS and i was wondering how to make a object a child of the player when a key is pressed
if(Input.Get$$anonymous$$eyDown("f")) gun.transform.parent = hand.transform; is along those lines if that's what you want. You might also want to look into On trigger events
Your answer
Follow this Question
Related Questions
Weapon pick up 3 Answers
picking up weapons script? 3 Answers
FindChild not working? (Pick up Object) 2 Answers
Player Animation change when pickup Weapon 0 Answers
Weapon Pickup and change 2 Answers