- Home /
How to make a gun work with camera?
My camera is not a solid capsule, rather an outline of one in green. I have a gun I just made in blender and there are no animations or scripts. What exactly do I do to have my camera move while the gun follows the camera as well. This is in first person, unity free version. Thanks.
Answer by felixpk · Jan 16, 2014 at 02:03 PM
Wow that's a perfect example of a bad question. Anyways I'm trying to help you. First of all, you have to make sure what structure you want to use, for example:
Should the gun move with the camera, or should the camera move with the gun? Logically it is the latter.
So you have to:
Add a script to your gun that moves the gun vertically and horizontal
Position the camera to the place you want it to be
parent the camera to your gun
If you need help to write such a script, there are tons of tutorials handling the exact same theme.
Hope this helps a bit.
Thanks. I did the parenting thing earlier and then when I aligned the gun with the camera body it worked. Sorry about that. Thanks for answering though :|
Your answer
Follow this Question
Related Questions
How can I make an object always look at the mouse? 2 Answers
Bullet won't move with gun? 2 Answers
How to rotate gun only on X and Y axis? 1 Answer
How to make camera position relative to a specific target. 1 Answer
How to bring reticles in different situations to the center of the camera? 0 Answers