Quantcast
Channel: Answers by "TheShadyColombian"
Viewing all articles
Browse latest Browse all 100

Answer by TheShadyColombian

$
0
0
First, create two variables, a float which will represent the delay you want (in this case, 10) and the other will be a timer, whose value we will increase every frame. In the Update() function, add a line similar to this: yourTimerVariable += Time.deltaTime; This will add the time, instead of just the number of frames. Read the docs page for Time.deltaTime for more info. It's a really useful variable. Then below that, add an if statement that verifies if the timer variable is greater than the variable which stores the delay you want, and execute whatever movement code you have inside those brackets. Let me know if you need more help.

Viewing all articles
Browse latest Browse all 100

Trending Articles



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