playMaker

Author Topic: Make Items Behind Mobile Controls Non-Clickable  (Read 550 times)

gregacuna

  • Full Member
  • ***
  • Posts: 139
    • View Profile
Make Items Behind Mobile Controls Non-Clickable
« on: February 05, 2020, 08:03:33 AM »
I have an interesting challenge. New games has signs/billboards which are clickable as the player is moving through the platformer. When they are clicked they get big, give the player some additional health and when they are clicked again they return to where they were. This is all working fine, but have come up with an interesting challenge...

On mobile when the sign is behind the mobile controls it gets clicked/selected instead of the navigation or fire buttons. I'm wondering how to fix this:

1. Is there an PM action which would put the controls in front so that nothing can be clicked behind them?

2. Is there a PM action which would let me define that the signs are only clickable when they are center screen (ie not behind the controls)?

3. Is there a way to put an invisible canvas behind the buttons so anything behind isn't clickable?

Thanks all!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15494
  • Official Playmaker Support
    • View Profile
Re: Make Items Behind Mobile Controls Non-Clickable
« Reply #1 on: February 06, 2020, 07:41:40 AM »
Hi,

 yes, make use of the IsPointerOverUiObject action, it will tell you if the pointer is over a UI, which then means that you should not interact with it.

Bye,

 Jean

gregacuna

  • Full Member
  • ***
  • Posts: 139
    • View Profile
Re: Make Items Behind Mobile Controls Non-Clickable
« Reply #2 on: February 06, 2020, 08:26:26 AM »
Thanks Jean...will give it a try tomorrow. Appreciate the info. Cheers.