I am making a 2D game, I need the camera to follow the player only on the x axis.
camera.main.transform.position.x = player.position.x; camera.main.transform.position.y=0; camera.main.transform.position.z=-10; camera.main.transform.rotation.x=0; camera.main.transform.rotation.y=0; camera.main.transform.rotation.z=0;
this results in extremly jerky movement.
Also I use a transform.translate to keep the player constantly moving at a constant speed. However I also have the player rotating on the z axis, the more the player rotates on the z axis the slower he moves.
transform.Translate((Time.deltaTime*3),0,0); //nothing fancy there not sure why change in angle would //cause it to slow down...