Quantcast
Viewing all articles
Browse latest Browse all 959

Answer by Graham Dunnett

`Input.GetButtonDown()` tells you when a button is first pressed. So, use a variable to store the current time, from `Time.time`. `Input.GetButton()` will tell you when that button is held down. So, compare current time with the stored time. If that meets you time delta then do your thing. You might want to add your time delta to the stored time value, so all you ever need do is look to see if now time minus your stored time is greater than your delta. When `Input.GetButtonUp()` happens, then you know your looping is done.

Viewing all articles
Browse latest Browse all 959

Trending Articles



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