Open fjavierv opened 9 years ago
I was thinking also that maybe would be interesting to used the distance to mesure when one objeto should sleep. Sometime object are vibrating (hight speed) however they are not moving, in the cases cannon won't sleep that object and maybe it should.
Cannon does consider the rotational speed. Added it in this commit: https://github.com/schteppe/cannon.js/commit/116750b76499dc8d015eb12a445101788ad9fd4b Did you enable sleeping on both the world and the body?
Distance might be an idea, but shouldn't a larger sleep threshold fix it anyway?
Stefan
I'.m sorry I was working with some old versión. I should have checked new code before write this.
You are right larger sleep threshold will repair, but some times you don't know what object should recieve this larger threshold, so if you apply it to all the object the get worse the performance.
True that. I think that statistical variance can be used to track the distance. Not sure if it would be better though.
Hi!. Should cannon consider rotational speed to avoid sleep object?. Thank for all and great job ;)