![Bulletphysics in whereas loop very sluggish in system – Cocos Creator Bulletphysics in whereas loop very sluggish in system – Cocos Creator](https://thefuntrove.com/wp-content/uploads/https://discuss.cocos2d-x.org/uploads/default/original/3X/c/9/c9a024cd3656916ac85bb3a01034f8075bc8f827.png)
[ad_1]
I’m making a Pool/Billiards recreation in cocos creator.
For AI calculation, I’m operating physics in whereas loop for some iterations and choose greatest shot. Issue is every thing works immediate in browser (<2 seconds for full 30 pictures), however after I run it in simulator or system (iOS/Android) it takes ~30 seconds of time.
There is nothing a lot in scene, solely 16 balls (sphere inflexible our bodies), and a Trigger to test if ball is pocketed or not.
I attempted “await nextFrame()” type of logic after each few iterations inside whereas loop however nothing a lot improved.
I looked for Multithreading in cocos creator however didn’t discover any documentation associated to it.
Please assist me on this.
[ad_2]