Mouse Emulation Info

0 votes
asked May 5, 2016 by aspartamed (196 points)
Is there a way to get the screen location where the cursor would be if mouse emulation mode was enabled?

Id like to enable mouse emulation mode when the cursor is over certain areas in the screen overlay space in Unity. Right now I feel like i am doing some complicated math to place hit objects behind those UI elements when ZSpace knows where the cursor should be already...
commented May 5, 2016 by aspartamed (196 points)
What I ended up doing was enableMouseEmulation all the time, then toggeling Cursor.visible whenever the Input.mousePosition was inside the RectTransform of the panel or outside. This can be annoying in the debugger as it does "steal" the mouse focus.
commented May 23, 2016 by dtwilleagerinfinitez-com (275 points)
In the new 4.0 plugin, you can call DisplayIntersectionInfo ZCore.IntersectDisplay(Pose pose) with the current stylus pose, and it will return all the screen space information.