Home Game Development Bulletphysics in whereas loop very sluggish in system – Cocos Creator

Bulletphysics in whereas loop very sluggish in system – Cocos Creator

0
Bulletphysics in whereas loop very sluggish in system – Cocos Creator

[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]

LEAVE A REPLY

Please enter your comment!
Please enter your name here