I am working in a 2d platform game I applied cinemachine camera and parallax script to give a good effect ,but the parallax is shaking and vibrating hard , I found out that the cinamchine was the reason because the camera it shaking, when I disabled the cinemachine it work smoothly
here is the parallax code
private float startpos;
private GameObject cam;
[SerializeField] private float parallax;
[SerializeField] private float speed = 0.1f;
// Start is called before the first frame update
void Start()
{
cam = GameObject.Find("Main Camera");
startpos = transform.position.x;
}
// Update is called once per frame
void Update()
{
float distance = (cam.transform.position.x * parallax);
transform.position = new Vector3(startpos + distance, transform.position.y, transform.position.z);
}
and the settings of the MC vcam1 enter image description here
please any help I dont find any on with that problem