bepu / bepuphysics2

Pure C# 3D real time physics simulation library, now with a higher version number.
Apache License 2.0
2.25k stars 261 forks source link

Fixed TimestepsUnderThresholdCount potentially overflowing #153

Closed Frooxius closed 2 years ago

Frooxius commented 2 years ago

Last of the small changes I made on my end for your consideration! :D

While I was poking around the sleeping issue, I noticed that a bunch of the bodies would not have any velocity to wake up, but would eventually wrap and start counting from 0.

I don't think it causes a big issue now as the bodies sleep before it can reach that high, but I figure the fix might be good to have in there regardless.