- Home /
Children don't move with parent
I have a main camera, parent of a eye in player's head... The movements are ok, but if my player crouch, the camera's position remain up and don't go down, but the eye move down and crouch with the player! What's the problem? Why the main camera don't move up and down? Help!
You say the camera is a parent of the eye (which means the eye is listed below the camera and a little indented.) That means the eye (child) follows the camera (parent), not the other way around.
Can you write the set-up (way it looks in Hierarchy) for camera and eye and player?
It's often better to not have the camera be a parent or child at all. It acts like a monkey wearing and helmet-cam, and jerks around too much. Ins$$anonymous$$d, the camera script can track the player using code, to get nicer smooth-ins.
this is guessing but it sounds like you are only animating a crouch not fully crouching when you crouch are you changing the scale on anything?
First: the camera is child of eye... However yes the crouch is an animation, it's a big problem?
I have recently changed player's 3d model because this is $$anonymous$$e and before it isn't $$anonymous$$e, in the first 3d model i make camera child of head's bone and it work perfectly, but now if i do it the camera rotate so very strange so i tryed with the eye.. I need this..
Is there a script manipulating the camera's transform in your scene by any chance ?
Answer by bodec · Jan 06, 2015 at 06:05 PM
Ok from everything that has been said the fix for your issue is to place a script on your camera. Have the camera through script follow your bone. the animation is just that a animation, if you look at your collider on the character you will see it doesn't change either. this is why the camera needs to follow the character through script. even if following is inside the character's head
Ok a script inside the camera but what it have to do? What do you mean with "follow"? Help me xD
its a lot like the camera script that comes with unitys 3rd person controller it follows the character based on its transform. what it appears you would want is for you camera to follow at a much closer look. Open a new project and import the character controller scripts unity supplies create a plane and drop the 3rd person controller on the plane and press play and check it out that is basically what you want your camera to do but following closer to your character(inside the characters head).
It seems to be very difficult lol there isn't an easiest way?
Your answer
Follow this Question
Related Questions
Need camera to follow player, but not the player's rotation. 13 Answers
moving objects relative to the player... 1 Answer
How to prevent a object (attached to the main camera) sticking into a wall? 0 Answers
Parent an object to the camera via script? 1 Answer
How do I have a Child tell a Parent to move without the Child itself moving 0 Answers