I am making a FPS and I have 2 guns. 1 is a pistol with actual animations, and the other is the m4 from the bootcamp demo. I want the m4 to simply go down like he is reloading. How would I do that with out making it look like it disappears and reappears? In case you are confused on what I mean, I want him to basically bring the gun down to where you cant see it, then it will play the reload sound, then he will bring it back up. Thanks for any answers in advance.
Answer by apukommander
Feb 02, 2011 at 02:55 PM
press Wto move guy.
WHAT is this?
press W to move? That is not what he meant? The title is a little misleading, but what ever. Do pay attention to the posters question.
Answer by Statement
Dec 19, 2010 at 05:05 AM
If your guns are simply attached to the camera you can add an animation on the M4 that simply moves it down. Use the animation editor. You can also add an animation event so it becomes easier to sync that reload sound. Then it becomes a simple matter of just calling animation.Play();
Answer by GlitchHunter505
Aug 27, 2013 at 06:08 PM
Well I can't give you an example currently (away from my desk), but one thing you could do is create a lerp function which would have the object's transform rotate over a course of time then after that time it would perform in the opposite direction. Probably not the most efficient way but hopefully this helps!
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
1 Person is following this question.
Invoke problem, can't manually reload
Temporarily disable audio?
Fps Controller fixed object (Gun) (Solved)
Switch Weapon Script Not taking effect HELP!!