playMaker

Author Topic: Ignore raycast on game objects - so that it just acts on GUI elements? [solved]  (Read 4279 times)

Grave_sts

  • Playmaker Newbie
  • *
  • Posts: 24
Hey all~

I am using EZGUI and playmaker in a point and click game. The one problem I have encounter however is that when I click on the GUI element the character moves to that position :< - I have tried several approaches but I seem to be missing the point ;)

Thanks in advance~ :)
« Last Edit: January 27, 2012, 12:55:55 AM by Grave_sts »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Ignore raycast on game objects - so that it just acts on GUI elements?
« Reply #1 on: January 26, 2012, 06:32:40 PM »
I haven't used EZGUI, but came across this in Unity Answers:

In EZGUI when I want to do this I place an invisible button that is disabled behind the GUI that overlays the main GUI so click-throughs cannot occur.

Unity Answers thread on this topic:
http://answers.unity3d.com/questions/53629/prevent-a-click-from-going-through-gui-buttons.html

You could implement some of those ideas in Playmaker too. E.g., have your GUI code set a flag that your world click code checks.

Seems trickier than you'd expect to get this working in Unity... :-\
« Last Edit: January 27, 2012, 02:15:35 AM by alexchouls »

Grave_sts

  • Playmaker Newbie
  • *
  • Posts: 24
Re: Ignore raycast on game objects - so that it just acts on GUI elements?
« Reply #2 on: January 27, 2012, 12:52:21 AM »
Thanks ^^ You just made my day :P