Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannon driver in worker mode has lots of issues #7

Open
diarmidmackenzie opened this issue Oct 30, 2022 · 1 comment
Open

Cannon driver in worker mode has lots of issues #7

diarmidmackenzie opened this issue Oct 30, 2022 · 1 comment

Comments

@diarmidmackenzie
Copy link
Member

diarmidmackenzie commented Oct 30, 2022

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?

@kylebakerio
Copy link
Member

I think that sounds reasonable for now, and is de-facto the case. If anyone wants to pick it up, that's always available to anyone who is motivated, but no reason to advertise it as current. It hasn't worked for quite some time at this point anyways, right? years?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants