pmndrs / use-cannon

👋💣 physics based hooks for @react-three/fiber
https://cannon.pmnd.rs
2.76k stars 154 forks source link

useSphere crashes on most recent `use-cannon` and `react-three-fiber` #216

Closed calvind777 closed 3 years ago

calvind777 commented 3 years ago

Bug Demo: https://codesandbox.io/s/use-cannon-applyforce-bug-report-forked-b5vim

I encountered this in my own project as well, and changing useSphere to useBox worked perfectly. You can also observe that bumping down the @react-three/fiber version to 2.2.0 fixes the crash.

bjornstar commented 3 years ago

Interesting, if you remove the debug wrapper it doesn't crash.

drcmda commented 3 years ago

should be fixed https://github.com/pmndrs/use-cannon/commit/21b046c80574871ae5feeac398f1159824f9c87b