JBP 2 Report post Posted November 7, 2016 Hello, can anyone tell me if the current implementation of the Physics engines (oimo, cannon) support Web Worker or its a single thread implementation ? Quote Share this post Link to post Share on other sites
tips4design 103 Report post Posted November 7, 2016 It's usually not worth running your physics in a separate Web Worker if you need to access the state of the world each frame, as reading/transferring data from the worker thread is costly and doing it each frame might be slow. Quote Share this post Link to post Share on other sites
Dad72 915 Report post Posted November 7, 2016 Yes since version 2.1 Workers is supported for the Physics engines (oimo and cannon) : Tutorial: https://blog.raananweber.com/2015/05/26/collisions-using-workers-for-babylonjs/ To enable it to do: scene.workerCollisions = true; 1 ian reacted to this Quote Share this post Link to post Share on other sites
ian 89 Report post Posted November 7, 2016 SetTimeStep 1/10 on phone with WebView Works smooth as 1/50 on desktop !!! Accuracy of physics work same. I verified this on My Project Perplexus. I have WebView for Android perplexus Project and with 1/10 It Works brilliant. On desktop It Works as fast as Real Perplexus If you ever try this Game. Try experiment on different devices with setTimeStep 1/10 or 1/5 for slower devices. Quote Share this post Link to post Share on other sites
JBP 2 Report post Posted November 7, 2016 7 minutes ago, Dad72 said: Yes since version 2.1 Workers is supported for the Physics engines (oimo and cannon) : Tutorial: https://blog.raananweber.com/2015/05/26/collisions-using-workers-for-babylonjs/ To enable it to do: scene.workerCollisions = true; Hello, but this if for the build in collisions right ? I asking for the oimo or cannon plug-in is the "world.step()" function called inside a Worker ? Quote Share this post Link to post Share on other sites
ian 89 Report post Posted November 7, 2016 http://www.babylonjs-playground.com/#2B84TV#2 Here is example of setTimeStep for physics. I did also as Dad72 say. But default 1/50 Works slow. The Real speed was when I add slider gui setings for setTimeStep. SetTimeStep is realy qul staff for slow phones WebView beleave me. If you dont try it 1 JBP reacted to this Quote Share this post Link to post Share on other sites