FPS - Looking Down The Barrel

I am making a FPS ( First Person Shooter ) and I am currently trying to figure out how to get the machine gun that I modeled out to move to the center of the screen when the right mouse button is pressed to use the sight on the gun.

I would like to know if this is done by simply animations of some sort or is this accomplished through script? If so, does anyone have any Java reference or links I may check out to learn?

Please, any help would be fantastic!

I am not the words best programmer, a tutorial maybe of some sort would be greatly appreciated if you know where to find one.

I am looking forward to it!

Thanks everyone.


You can use Unity3d's FPS tutorial posted here : http://unity3d.com/support/resources/tutorials/fpstutorial

For moving the gun, You can set the position of the scope to the camera's position on pressing Fire2.

Again, for Zooming in on the object, You can change the Camera's fieldOfView setting.