- Home /
How do I make an object move?
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!
Your answer
Follow this Question
Related Questions
Reload help 1 Answer
Some issues with weapon switching and reloading? 2 Answers
Reload Mobile 0 Answers
Invoke problem, can't manually reload 1 Answer
Temporarily disable audio? 1 Answer