- Home /
FPS Controller and Head Bob
Hi! I have a hierachy in my scene:
The problem is that I want my gun to follow the camera when moving up and down. I tried do to this by making the gun a child of the camera, but then it stopped to bob while walking. It bobs correctly when it's a child of FPSController, but then it doesn't follow the camera properly. Can you tell me why? How to solve this?
Answer by Zitoox · Aug 05, 2016 at 04:13 AM
Hm... Let me see.
If you make an object a child of another, the child will follow it's parent around. The FPS Controller is just "the thing". The actual player is the FirstPersonCharacter, that is a child of it.
Make your weapon a child of the FirstPersonCharacter, and then place the weapon in a place where the camera can actually see it. By doing this, as you move the camera and walk around, the weapon will follow the camera too. With this, you can aim anywhere :D
If the bob doesn't work, it may be something with your 3D model.
Your answer
Follow this Question
Related Questions
How do I make a camera bob when I walk? 3 Answers
FPS Walker Enhanced popping up in the air 0 Answers
fpscontrol how do i login on unity 1 Answer
Ultimate FPS Camera How i can add animation? 0 Answers
Camera Bobbing and Stairs 4 Answers