Timeline for How do I run code for a period of time and then return to normal behavior?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 28, 2016 at 19:01 | vote | accept | Mohit Saxena | ||
Dec 28, 2016 at 18:57 | history | edited | Mohit Saxena |
edited tags
|
|
Dec 28, 2016 at 18:56 | comment | added | Krythic | What does this question have to do with recursion? | |
S Dec 28, 2016 at 18:25 | history | suggested | BobGneu | CC BY-SA 3.0 |
proof reading
|
Dec 28, 2016 at 18:14 | review | Suggested edits | |||
S Dec 28, 2016 at 18:25 | |||||
Dec 28, 2016 at 17:57 | comment | added | tomsseisums |
Why are you casting deltaTime to int? That is locking your for loop endlessly, because deltaTime is usually around 16.67ms, which makes it inhibit the value 0.1667f which when cast to int is rounded and due to it being < 0.5, equals 0. You can imagine that 0 + 0 will never reach >= 5, therefore never exit your loop and therefore, lock Unity.
|
|
Dec 28, 2016 at 17:55 | answer | added | Philipp | timeline score: 6 | |
Dec 28, 2016 at 17:31 | history | asked | Mohit Saxena | CC BY-SA 3.0 |