pmndrs / drei

🥉 useful helpers for react-three-fiber
https://drei.pmnd.rs/
MIT License
8.12k stars 662 forks source link

Using GizmoHelper with CameraControls does not work as expected #1372

Open vincent-azumuta opened 1 year ago

vincent-azumuta commented 1 year ago

Problem description:

https://user-images.githubusercontent.com/81570907/228866509-e97adaa5-69ac-40af-89d8-93d782b9b34f.mov

Relevant code:

I have made a minimal reproducible example below.

https://codesandbox.io/s/react-three-fiber-camera-controls-forked-xirtvj?file=/src/App.tsx

The GizmoHelper crashes when initialised with default properties.

I had to add the code below to make it work, but then it results in the behaviour in the video.

                onTarget={() => {
                    const v = new Vector3();
                    controlsRef.current?.getTarget(v);
                    return v;
                }}
vincent-azumuta commented 1 year ago

Might be related to #522 ?

1uciuszzz commented 1 month ago

i am facing the problem, too