Hi friends, I have a question, I started using Cannon.js and Three.js, and created a game, but physics works differently in different browsers, is this due to the calculation of numbers in JavaScript?
Thanks in advance.
Could you specify how they work differently (or share an example to test) ?
The main issue between browsers / devices I could imagine is the framerate and occasional bottlenecks - so be sure to pass an actual calculated dt
between frames, when updating cannon world, instead of just an arbitrarily tiny number.
could also be bugs. if you’re using cannon, use this fork which is maintained: GitHub - pmndrs/cannon-es: 💣 A lightweight 3D physics engine written in JavaScript. the original hasn’t seen a commit for more than 5 years, all its longstanding bugs were never fixed, prs never merged. if your problems persists, open an issue there and they’ll look at it.
1 Like