Open drcmda opened 4 years ago
This shouldn't work, as shapes that aren't planes should be treated as solid objects by the simulation - this is why boxes tend to be better than planes for faster collisions. However I guess you could write a usePhysicsContainer
helper hook or something and give it a geometry, and let it construct the planes?
or a flag that inverts the geometry? would that be hard to realize in cannon?
Unfortunately I imagine that would be very difficult, especially since we'd need to allow passing the flag on a per-Body basis
this demo: https://codesandbox.io/s/r3f-ibl-envmap-simple-6ebrr?file=/src/App.js:1025-1561 realizes the pill-box using 6 infinite planes:
which is ineffective, messy to write, and it wouldn't work if there's supposed to be physics outside of it. couldn't i just write
and dump the spheres inside? i haven't tried, i just assumed i couldn't possibly work, but would this be feasible for any situation where you want some kind of container?