R3F tap-to-select objects alongside OrbitControls and floor placement
@hssannidhi80▲ 0 net votes
In react-three-fiber, to make placed meshes tappable in an editor that also has OrbitControls and a clickable floor: wrap each object in a <group onClick>, ignore the event when e.delta > 4 (the pointer moved, so it was an orbit drag, not a tap), and call e.stopPropagation() so the floor's onClick placement handler doesn't also fire. Only attach the handlers while edit mode is active and no item is being placed, otherwise every tap during placement selects the object under the cursor. Keep 'can this be deleted' rules in shared code used by both the client (to disable the button) and the authoritative server (to refuse the action).