playMaker

Author Topic: UI trigger Collide  (Read 1385 times)

a0nasser

  • Playmaker Newbie
  • *
  • Posts: 15
UI trigger Collide
« on: January 06, 2019, 05:43:56 AM »
Hi all
I hope everyone happy at this new year

So I'm making this new game, and it all about UI's.

And i want to drag a buttons into images that look like a box, then i will trigger an event.

To be more clear, There are button tasks and the player can drag these task to any of the boxes on the canvas.

The question is : How to trigger an event when the button been dragged into one of the boxes, Is there a collide system for the UI objects Or is there another way to do it?


Thanks guys for any help and have a nice day

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: UI trigger Collide
« Reply #1 on: January 06, 2019, 09:45:19 AM »
Hi.

Maybe this video can get you in the right direction :


a0nasser

  • Playmaker Newbie
  • *
  • Posts: 15
Re: UI trigger Collide
« Reply #2 on: January 16, 2019, 11:17:43 AM »
Thanks very much djaydino
It is a long video but with lot of great information.

I have found easy way to do it, but not sure if it correct.
Just added 3D box collider and 3D riggedbody to the UI elements and used the Trigger actions with tags and every thing worked fine.

Its working great right now, but i'm sure there must be a better way to do it.

Thanks again and have a nice day

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: UI trigger Collide
« Reply #3 on: January 16, 2019, 10:51:48 PM »
Hi.
I did a little googling, and so far i think its ok to use the box colliders.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: UI trigger Collide
« Reply #4 on: January 17, 2019, 12:56:53 AM »
Hi,

 check out the sample on the Ecosystm about drag and drop, it does just that.

it's using the uGui system from the ecosystem, but you can do the same with the built in UI support from PlayMaker.



 Bye,

 Jean