Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

logging a transform every 0.5 seconds for means of getting an average...

$
0
0
I would like to log the transform.position.z of an object every 0.5 seconds... store this data and calculate an average of the transform.position during the last 5 seconds... Thus after 5 seconds each new log should replace the oldest...

It is a very difficult question to 'google' hence I am here asking for some tips as to where to look regards researching the problem...

My guess is that coroutines, and lists would be the way to do this. I have no experience of these functions yet.

Thanks...

logging a transform every 0.5 seconds for means of getting an average...

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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