Closed joneszhuchinagd closed 9 years ago
I guess this solves it, but why not just do this.idleTime=0;
in the Body
constructor?
You are right, I hope you can improve in the latest version.I just let you aware of the problem。
I have thought of your solution, but I'm afraid influence to the robustness of the code
You know, the p2 is going to hot up in China, because of the introduction of the physics engine egret game framework.I made a table tennis game with p2, and found a lot of collision detection is not accurate.If too fast, it will affect the judgment of collision detection.So I made some before the collision detection.
"influence to the robustness of the code"? How? Did you test it? I will push the constructor fix in a minute.
Regarding the inaccurate collision detection: The best solution for that is Continuous Collision Detection (CCD), but it's unfortunately not available in p2 yet. I have some ideas on how to implement it though. What you can do for now is make the time step smaller.
Very happy to hear about the Egret engine! Cool :D
nice~
To repair the new body, its sleepstate status is sleepy . Body.js have modified somewhere.