React Three OrbitControls breaks on state Change

I made an application with react, react-three/fiber and react-three/ drei. I’m trying to change a state while orbiting around. Unfortunately as soon as I change any state while orbiting around my OrbitControls is no longer working, except zooming out via scroll wheel works as expected.

I was able to recreate my issue in a sandbox:

If you comment out line 17 in my controls.js file you can drag rotate and zoom. Otherwise you can only zoom out with your mouse wheel.

I hope you can help me. Thanks in regard

small bug in drei, it disposes and re-connects on callback changes, leaving controls in a bad state. should be fixed and up in 5 minutes. btw you should not give it the args argument, it takes care of construction by its own.

1 Like

Wow, thanks for the quick response and fix. I really appreaciate your help. :+1: