playMaker

Author Topic: Mousepick and GUI  (Read 1159 times)

FRickReich

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Mousepick and GUI
« on: January 22, 2014, 03:42:20 PM »
I have a little problem that i thought you guys might be able to help me without alot of hassle...its like i am just missing a point here...

thing is that if i have a mouse pick in my scene and some gui objects on screen, and i click on a gui button, it actually takes the raycast informations from below the gui, wich is kind of annoying. i just wonder what i can do to keep the raycast from working beneath the GUI, layers dont seem to do the job.

- Rick.

parallel

  • Full Member
  • ***
  • Posts: 155
    • View Profile
Re: Mousepick and GUI
« Reply #1 on: January 22, 2014, 05:45:09 PM »
Which GUI solution? unity's own or 3rd party

FRickReich

  • Playmaker Newbie
  • *
  • Posts: 21
    • View Profile
Re: Mousepick and GUI
« Reply #2 on: January 23, 2014, 03:20:48 AM »
Unitys own, using GUILayout actions in playmaker.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14692
  • Official Playmaker Support
    • View Profile
Re: Mousepick and GUI
« Reply #3 on: January 24, 2014, 04:22:19 AM »
Hi,

 you can't unfortunatly apart from checking the result of the raycasting and ignore its process if you detect that's it's over a gui element.

 the other solution is to delay the raycasting and wait for your gui element to warn your system of a mouse or touch event in which case you would not fire the raycast at all.

bye,

 Jean