introducing frequncy factor or samplinga value
i always wanted to know or ask a question / concept, which really frustrates me a lot. how exactly to sample a value or control frequency of something. i.e : as user touch on screen, i can capture its position. but i don't want to capture per frame. i want to capture x times per second. ? another example, i wanted to make a line or curve from user drawing on screen, but i don't want to capture 25 or 30 points per second, i want to sample those to 10 or so.?
generally what i wanted to ask, how exactly i can control sampling rate or what is best practice to do this without adding a separate timer or coroutine etc. huge thanks in advance
Answer by Jessespike · Apr 06, 2016 at 09:12 PM
it's also known as time-splicing. Using your own timers in Update functions or using coroutines should be fine. There's also InvokeRepeating. FixedUpdate also executes at a specific rate that can be set in Unity.
Your answer
![](https://koobas.hobune.stream/wayback/20220612074320im_/https://answers.unity.com/themes/thub/images/avi.jpg)