pmndrs / react-three-rapier

🤺 Rapier physics in React
https://react-three-rapier.pmnd.rs
MIT License
1.09k stars 62 forks source link

Problem with Draco Compressed .glb files and RigidBody colliders #627

Open stefano-ciotola opened 9 months ago

stefano-ciotola commented 9 months ago

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

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 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