Hey guys. I making a shooting game with unity 3d, and I want a script or something that makes the gun physically reload.( you know, like take the clip out with your hand, and put in a new one). that sorta thing. So id appreicate iif anyone could give me directions on how to do that. thanks so much guys.
that would be an animated cycle.
Answer by lhk
Oct 24, 2010 at 01:38 PM
This is done by animations. I assume you have got a model for the weapon and the player or maybe one model for both. Now you need to fire up your modeling program and view some tutorials about animating. For example you could use Blender. A good website is BlenderCookie.org . In case of Blender Unity imports the animations together with the model and you can control them via scripting. Let's assume your gun got an Animation Component with an Animation Clip named "reload" attached to it. Playing the animation is now as simple as
The scripting part is easy but the animating is difficult.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
No one has followed this question yet.
Gun script reload problems
Make player unable to shoot when reloading
No Reload Script Works
Wrote a script for Shooting, reloading and to display the AMMO in a GUIText
How to add the needed amount to the AmmoCount (current ammo)?