Quantcast
Channel: Questions in topic: "interpolate"
Viewing all articles
Browse latest Browse all 93

Smooth camera size interpolation

$
0
0
I am trying to interpolate the camera size with this code: // t counts between 0 and 1 cam.orthographicSize = Mathf.SmoothStep(cam.orthogaphicSize, CAMERA_DEFAULT_ZOOM * ZoomFactor, t); The issue is that this does not produce a smooth result. I think that is because I update orthographicSize and use it as the starting point for each iteration. What is the proper way of interpolating with a moving start value ? One option i thought of was to keep track of the orthographicSize at the moment of starting the interpolation. I am not sure that is the best approach.

Viewing all articles
Browse latest Browse all 93

Trending Articles



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