- Home /
Question by
Rustam-Ganeyev · Sep 26, 2012 at 01:23 PM ·
camerasorthographicezgui
Receive raycast from uicamera, ignore raycast from main camera?
I have 3d objects on scene, rendered by perspective camera(mainCamera). And I have orthographic camera, needed for drawing ui(uiCamera). In 3d-world i can tap anywhere, mainCamera gets raycast and something happens. It works ok. And now I have problem with ui: if I tap on ezgui's button, button gets pressed, but main camera also gets raycast. I want to ignore raycast from main camera. How can I deal with that? I just want to tap on button, not 3d scene.
Comment
Answer by Sundar · Sep 26, 2012 at 04:35 PM
Have one or more rectangular area(s) within which you have all your buttons. Check tap position against those areas, if inside ignore else process the tap.