You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a collirer with RAPIER.ColliderDesc.convexMesh does not work.
Here is a simple test case:
let geometry = new THREE.BoxGeometry(size, size, size);
let mesh = new THREE.Mesh(geometry, new THREE.MeshLambertMaterial({color: color}));
let collider_desc = RAPIER.ColliderDesc.convexMesh(mesh.geometry.attributes.position.array, mesh.geometry.index.array);
inputs should be correct, THREE.BoxGeometry is convex.
But, this causes an error:
rapier3d-compat.js:38 Uncaught Error: expected instance of IA
at a (rapier3d-compat.js:38:11)
at l.createCollider (rapier3d-compat.js:467:7)
at sI.createCollider (rapier3d-compat.js:3807:236)
at eI.createCollider (rapier3d-compat.js:4099:27)
at init (main.js:70:26)
at async main.js:20:1
I ran into this problem as well. My data would work as a convexHull but not as a convexMesh. I was able to get convexMesh to work by excluding the indices argument and only providing the vertices
Update: I'm wondering if the underlying issue is with the indices ArrayBuffer data type.
Creating a collirer with RAPIER.ColliderDesc.convexMesh does not work.
Here is a simple test case:
inputs should be correct, THREE.BoxGeometry is convex.
But, this causes an error:
can be reproduced in sandbox: https://codesandbox.io/p/github/coolvision/rapier_js_examples/master?workspaceId=e7df68ff-e684-4891-81ac-cef3e7594869
The text was updated successfully, but these errors were encountered: