- Home /
Where should I attach my camera?
Well, this is pretty simple:
We got to make a game for the end of the year and here is my problem:
It is a First Person game and I have a character model with my animations. The problem is that when I attach the camera to the player, wherever I place it you can either see through walls or see inside your body (and it sucks when I'm sneaking or rolling on the ground). When I attach it to the head, I got the animations that keep me from aiming.
What should I do? (I just need the Vertical look, about the horizontal look, the character's model moves instead of the camera)
Answer by Cherno · Mar 16, 2015 at 12:08 AM
Make the camera a parent of the root character object, and in LateUpdate(), set it's localEulerAngles to a value of your liking (probably 0 for y and z, and the x value relative to the mouse axis y input). As for looking inside your body, you could remove the body's layer from the camera's culling mask so it's not rendered by the camera. If you clip into walls, set the camera's NearClippingPlane to a lower value (0.01 or somehing like that).
Your answer
![](https://koobas.hobune.stream/wayback/20220613190233im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Making a bubble level (not a game but work tool) 1 Answer
Need help with tool animations!! 1 Answer
Instantiated Bullet Lags Behind Animated Timeline Object 1 Answer
Multiple Cars not working 1 Answer
animation moving 0 Answers