react-postprocessing icon indicating copy to clipboard operation
react-postprocessing copied to clipboard

react-postprocessing and drei GizmoHelper NOT COMPATIBLE? [with sandbox]

Open quacrobat opened this issue 2 years ago • 4 comments

Hello, when I use postprocessing EffectComposer, the drei GizmoHelper disappears.

see codesandbox: https://codesandbox.io/s/react-three-postprocessing-vs-drei-viewcube-veq3c?file=/src/index.js

if you delete the <EffectComposer /> the Gizmo reappears. (Even with actual effects within it, it's the same problem)

Why is this happening and how to fix it?

Thank you

quacrobat avatar Aug 15 '21 19:08 quacrobat

*bump

quacrobat avatar Aug 27 '21 04:08 quacrobat

Ran into the same issue today. @quacrobat , were you able to find a workaround?

Edit: There's a property available on GizmoHelper called renderPriority. Increasing the priority (setting to 2 in my case) made the gizmo visible again.

discosultan avatar Feb 21 '22 18:02 discosultan

hI @discosultan try something like this:

<EffectComposer />
<Gizmo renderPriority={2} />

from https://github.com/pmndrs/drei/issues/519 It worked at first for me but wasn't robust enough once my app became more complex. If it doesn't work for you let me know I'll try to dig back and find how I hacked it.

quacrobat avatar Feb 21 '22 20:02 quacrobat

That did the trick for me. Thank you @quacrobat!

discosultan avatar Feb 21 '22 20:02 discosultan