Quantcast
Channel: Questions in topic: "follow"
Viewing all articles
Browse latest Browse all 536

Smooth Camera 2D

$
0
0
Hi, 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? Vector3 point = camera.WorldToViewportPoint(target.position); Vector3 delta = target.position - 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);

Viewing all articles
Browse latest Browse all 536

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>