playMaker

Author Topic: Ignore MousePick through UI layer?[SOLVED]  (Read 2490 times)

Moonatic

  • Playmaker Newbie
  • *
  • Posts: 2
Ignore MousePick through UI layer?[SOLVED]
« on: January 03, 2020, 05:03:04 PM »
Hi there! I have this issue, I have a point-and-click movement system using Navemesh. I also have some UIs like character button, IA settings and such. Problem is, when i click on the UI the mouse picks the position under the UI, which i'd like to avoid. I've tried using Pick's layers, but they actually ignore the UIs and picking the position anyway. I'm pretty much hopeless by now, am I missing something? Thanks in advance.
« Last Edit: January 05, 2020, 05:19:51 AM by Moonatic »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Ignore MousePick through UI layer?
« Reply #1 on: January 04, 2020, 12:04:55 PM »
Hi.
Maybe 'Is Pointer Over Ui Object' can help here.
so before you do mouse pick, check if pointer is over a ui object.

Moonatic

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Ignore MousePick through UI layer?
« Reply #2 on: January 05, 2020, 05:19:14 AM »
That's it, works like a charm. Thank you!

cper

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Ignore MousePick through UI layer?[SOLVED]
« Reply #3 on: August 20, 2023, 05:25:19 AM »
Hi, I have similar situation. I used Is pointer over UI object and it is fine in Unity Editor. But when I build on iOS device and test on iPhone, the Pointer over UI is not working.

Is still ignore and pass thru the UI canvas. I also tried different method by using Touch event + Touch over UI instead of Mouse pick but both are not working on iOS device.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Ignore MousePick through UI layer?[SOLVED]
« Reply #4 on: August 21, 2023, 05:38:28 AM »
Hi.
I never used Ios build yet.
For android I have used Control Freaks 2 which has playmaker support.

I would suggest to hop on the Playmaker Discord channel.
I'm sure that there are people there that have been making builds for Ios that could help out.


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Ignore MousePick through UI layer?[SOLVED]
« Reply #5 on: September 01, 2023, 01:02:11 PM »
Hi.
Just checking, are you using any Get/Set Properties in your build?

cper

  • Playmaker Newbie
  • *
  • Posts: 17
Re: Ignore MousePick through UI layer?[SOLVED]
« Reply #6 on: September 01, 2023, 11:02:25 PM »
I am not using get/set property and Linker wizard doesn't work on this. I managed to get this working with suggestion on discord channel.

Basically I have to add a check on UI raycast count on the 3D pick, if count is more than 1 (meaning 2D UI detected) it will ignore my 3D pick. Is not the best solution but works for now.