- Home /
Smooth Camera 2D Follow Player
Hi,
Vector3 point = camera.WorldToViewportPoint(target.position + new Vector3(0,4,0));
Vector3 delta = target.position + new Vector3(0,4,0) - camera.ViewportToWorldPoint(new Vector3(0.5f, 0.5f, point.z));
Vector3 destination = transform.position + delta;
transform.position = Vector3.SmoothDamp(transform.position, destination, ref velocity, dampTime);
I had some problem with this script. When the speed of the Player is higher than the camera's speed, then there is a bad effect. Is like the camera tremble up and down at high speed. How can i solve it? please answer me, and thank you :)
Comment
Your answer
Follow this Question
Related Questions
Cinemachine 2d camera problem 0 Answers
Smooth Camera 2D 0 Answers
camera follow problem-unity 4.3 2d 1 Answer
2D Camera Smooth follow, FixedUpdate and LateUpdate odd difference, help needed. 1 Answer
Follow Player 2d 1 Answer