Wednesday, 5 May 2010

Timer fixed

Very close to the deadline, but have finally fixed the timer. *sigh of relief*. Apparently, the problem was caused by by the result of the division being rounded up to the next integer if the decimal point is above .5.

To fix this, I needed to use
Mathf.FloorToInt function to make sure the lowest integer is always returned. Thanks to andeeee on the Unity forums for this fix.

No comments:

Post a Comment