useConvexPolyhedron not working? #204
Answered
by
stockhuman
danielacorner
asked this question in
Q&A
-
since migrating from sandbox: https://codesandbox.io/s/useconvexpolyhedron-bug-bqdqz?file=/src/App.js function Shape() {
// ? doesn't work with useConvexPolyhedron
// const polyRef = useConvexPolyhedron(() => ({
// mass: 1,
// args: new THREE.IcosahedronGeometry(1, 1)
// }));
// works with useBox
const boxRef = useBox(() => ({
mass: 1,
args: [1,1,1]
}));
return <mesh ref={boxRef}>
<boxBufferGeometry/>
<meshBasicMaterial/>
</mesh>;
} when I uncomment any ideas? thanks 🙏 |
Beta Was this translation helpful? Give feedback.
Answered by
stockhuman
Jun 12, 2021
Replies: 1 comment 2 replies
-
Hi Daniel, The ability to pass If you dig into the source, you'll see that use-cannon is trying to Good luck! |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
stockhuman
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Daniel,
The ability to pass
THREE. Geometry
directly is no longer supported as of 0.6, check out the convex polyhedron example to see how it's used.If you dig into the source, you'll see that use-cannon is trying to
map
vertex arrays, but none were supplied.Good luck!