-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Previously the Cannon examples used a mix of local & worker drivers.
I updated the examples so that there is a version of each for local and one for worker. This exercise revealed a number of problems with the worker driver in the current code:
1 - Compound shapes example does not work at all
Error:
aframe-physics-system.js:18755 Uncaught Error: Unimplemented shape type: %s
at serializeShape (aframe-physics-system.js:18755:11)
at Array.map (<anonymous>)
at module.exports.serializeBody (aframe-physics-system.js:18620:25)
at WorkerDriver.addBody (aframe-physics-system.js:18031:65)
at o.addBody (aframe-physics-system.js:18455:17)
at i._play (aframe-physics-system.js:16603:17)
at i.tick (aframe-physics-system.js:16578:12)
at HTMLElement.value (a-scene.js:739:34)
at HTMLElement.value (a-scene.js:789:36)
at bind.js:12:17
2 - Constraints example doesn't work at all.
b09bff94-0230-42fa-8b9a-8becd4f0f90a:6281 Uncaught TypeError: Cannot read properties of undefined (reading 'quaternion')
at ConeTwistConstraint.update (b09bff94-0230-42fa-8b9a-8becd4f0f90a:6281:11)
at ConeTwistConstraint.update (b09bff94-0230-42fa-8b9a-8becd4f0f90a:6476:44)
at World.internalStep (b09bff94-0230-42fa-8b9a-8becd4f0f90a:12903:11)
at World.step (b09bff94-0230-42fa-8b9a-8becd4f0f90a:12631:12)
at LocalDriver.step (b09bff94-0230-42fa-8b9a-8becd4f0f90a:13547:14)
at step (b09bff94-0230-42fa-8b9a-8becd4f0f90a:13737:12)
3 - "force-push" component doesn't work at all (multiple examples)
4 - sandbox example - constraint between green cone & purple box does not work.
5 - sweeper example - sweeper bar does not move the blocks
6 - ttl example - entities fall through the plane when they should land on it.
None of these issues has been investigated yet. If we want to investigate them, we should split out into separate issues to track each investigation.
Bundling together as one issue for now, as it's not clear there's sufficient motivation to work on the cannon worker driver, when we also have Ammo drive and PhysX available, which are probably both more performant, more functional and more reliable.
Maybe time to deprecate the Cannon Worker driver?