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.

more ▼

asked Dec 19 '10 at 04:52 AM

Kazaskater gravatar image

96 16 16 23

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

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();

more ▼

answered Dec 19 '10 at 05:05 AM

Statement gravatar image

25.3k 41 78 197

(comments are locked)
10|3000 characters needed characters left

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!

more ▼

answered Aug 27 '13 at 06:08 PM

GlitchHunter505 gravatar image

8 5 6 8

(comments are locked)
10|3000 characters needed characters left

press Wto move guy.

more ▼

answered Feb 02 '11 at 02:55 PM

apukommander gravatar image


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.

Feb 02 '11 at 03:34 PM OrangeLightning
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Dec 19 '10 at 04:52 AM

Seen: 2314 times

Last Updated: Aug 27 '13 at 06:08 PM