Reputation: 1099
Im wondering how to detect a click on an empty space on my canvas using react-three/fiber. For example to deselect an object. Is there a build in way or do I have to implement a raycaster?
thanks in regard.
Upvotes: 1
Views: 1915
Reputation: 658
Try using onPointerMissed
on the <Canvas>
element, as documented here: https://docs.pmnd.rs/react-three-fiber/api/events
Upvotes: 2