- Home /
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 just move the gun's local x position to 0 if it's a child of the camera object.
Answer by diabloroxx · Jul 14, 2010 at 02:57 PM
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.
Your answer
Follow this Question
Related Questions
Is there a script out there that actully works for shooting bullets? 2 Answers
How can I make a gun shoot raycast by rounds per minute(RPM)? Making a FPS controller and need help! 0 Answers
Need help... Start Button no longer working!!!!! 0 Answers
Automatic gun shoot sound 2 Answers
I need help with my script 3 Answers