Quantcast
Channel: Latest Questions by orcinusdev
Viewing all articles
Browse latest Browse all 26

Framerate affects speed of Lerp function

$
0
0
Hey! I have this code public IEnumerator MoveExample(Vector3 newPosition, float time) { float elapsedTime = 0; while(elapsedTime < time) { transform.position = Vector3.Lerp (transform.position, newPosition, (elapsedTime/time)); elapsedTime += Time.deltaTime; yield return null; } } } When changing framerate (quality setting of game), the lerping goes faster/slower. Why do this occur when I use Time.deltatime? Best regards

Viewing all articles
Browse latest Browse all 26

Trending Articles



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