react-three-rapier icon indicating copy to clipboard operation
react-three-rapier copied to clipboard

Problem with Draco Compressed .glb files and RigidBody colliders

Open stefano-ciotola opened this issue 1 year ago • 0 comments

Description

When attempting to import a Draco-compressed .glb file in Blender and using it within a <RigidBody colliders="hull"> component, I encounter an error stating "expected instance of BA". This issue prevents the proper creation of colliders, hindering the use of physics with the imported model.

Steps to Reproduce

  • Compress this .glb model during export in Blender: https://github.com/stefano-ciotola/3d-models/blob/main/ProblematicGLB.glb
  • Import the compressed .glb model into a React Three Fiber scene.
  • Wrap the model with a <RigidBody colliders="hull"> component.
  • Observe the error upon loading the scene.

Expected Behavior

The Draco-compressed .glb model should be correctly imported and wrapped with the specified collider without any errors, as it happens with other compressed .glbs.

Actual Behavior

An error is thrown during the creation of the collider, specifically when the <RigidBody> component attempts to process the Draco-compressed model.

Error stack

expected instance of BA
a@http://localhost:3000/static/js/bundle.js:2658:32
createCollider@http://localhost:3000/static/js/bundle.js:3178:8
createCollider@http://localhost:3000/static/js/bundle.js:7632:20
createCollider@http://localhost:3000/static/js/bundle.js:7092:27
createColliderFromOptions@http://localhost:3000/static/js/bundle.js:21238:16
./node_modules/@react-three/rapier/dist/react-three-rapier.esm.js/AnyCollider</getInstance<@http://localhost:3000/static/js/bundle.js:22097:47
./node_modules/@react-three/rapier/dist/react-three-rapier.esm.js/useImperativeInstance/getInstance<@http://localhost:3000/static/js/bundle.js:21994:21
./node_modules/@react-three/rapier/dist/react-three-rapier.esm.js/useImperativeInstance/<@http://localhost:3000/static/js/bundle.js:22000:22
commitHookEffectListMount@http://localhost:3000/static/js/bundle.js:70474:30
commitPassiveMountOnFiber@http://localhost:3000/static/js/bundle.js:72037:42
commitPassiveMountEffects_complete@http://localhost:3000/static/js/bundle.js:72008:38
commitPassiveMountEffects_begin@http://localhost:3000/static/js/bundle.js:71998:45
commitPassiveMountEffects@http://localhost:3000/static/js/bundle.js:71988:38
flushPassiveEffectsImpl@http://localhost:3000/static/js/bundle.js:74281:32
flushPassiveEffects@http://localhost:3000/static/js/bundle.js:74241:18
./node_modules/react-reconciler/cjs/react-reconciler.development.js/$$$reconciler/commitRootImpl/<@http://localhost:3000/static/js/bundle.js:74066:13
workLoop@http://localhost:3000/static/js/bundle.js:81952:46
flushWork@http://localhost:3000/static/js/bundle.js:81930:18
performWorkUntilDeadline@http://localhost:3000/static/js/bundle.js:82167:25

stefano-ciotola avatar Feb 22 '24 19:02 stefano-ciotola