I have a r3f scene with a mesh and a GizmoViewcube. console.log
prints all change events from CycleRaycast
. When mouse moves over the gizmo hits appear in console. When mouse is over the mesh - nothing happens.
How can I make CycleRaycast
"see" all objects?
import { Canvas } from '@react-three/fiber'
import { CycleRaycast, GizmoHelper, GizmoViewcube } from '@react-three/drei'
export default function App() {
return (
<Canvas camera={{ position: [-100, -100, 80] }}>
<ambientLight />
<pointLight position={[100, 100, 100]} />
<mesh>
<sphereGeometry args={[20, 15, 24]} />
<meshBasicMaterial color="red" />
</mesh>
<GizmoHelper alignment="top-right">
<GizmoViewcube />
</GizmoHelper>
<CycleRaycast onChanged={(objects, cycle) => console.log('o&c', objects, cycle)} />
</Canvas>
)
}