So I have a simple setup where every 1 second I add 0.1 to a instance variable. Problem being in the debug mode it is adding like 0.1000000000001 every 1 second. Not really sure why is this happening. Any ideas what I may be doing wrong here?
It's the way float values work. You can do this:
Add 0.1 to var Set var to int((var*10)/10
Develop games in your browser. Powerful, performant & highly capable.
Yep that seemed to do the trick, thank you very much. I was unaware of this with floats.