- Home /
Camera rig warning! Auto Cam Script
Hi,
I am trying to fix a camera to a car so that when it is driven, the camera will follow. Much to my annoyance, this isn't working for me as easy as I'd hoped. I have the car already active but every time I add the 'AutoCam' script to the 'Main Camera', (so i can drive the car) I get the following:
*Camera rig warning
You should only adjust this camera's Z position. The X and Y values must remain zero. Instead, move the Camera's parent (the "Pivot") to adjust the camera view*
It work's non the less but the camera is fixed at idle 'under' the car. The car can go of screen when turning sharply and I cant edit anything in the inspector window without getting this warning. I have tried editing the Z position but this does nothing.
Any solutions I can try? Even if I have to download another script.
Also, what is 'Camera's parent'?
Thanks in advance :)
Seems you have the camera as a child of another object.
Either unparent and add script or parent with no script.
Answer by josepmir · Feb 10, 2016 at 11:08 PM
Hi, I can't remember if it was giving a warning to me, but I also had the camera go under the car after using AutoCam script.
I solved this modifying AutoCam.cs, after the comment // camera position moves towards target position: transform.position = Vector3.Lerp(transform.position, m_Target.position + m_Target.transform.forward -2 + m_Target.transform.up 2, deltaTime*m_MoveSpeed);
So what I actually did, was tricking the camera into thinking that the target he is following is actually 2 units higher and -2 units "behinder".
Your answer
Follow this Question
Related Questions
assign waypointcircuit to waypointprogresstracker at runtime 1 Answer
Move linked camera after parent walked a distance 1 Answer
Camera turns to the front when reversing car 1 Answer
Howto set main.camera as a parent when main.camera itself is a child of a prefab 1 Answer
Shadows are not continuous and only when i go near they be shown. 0 Answers