Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: krane on February 24, 2017, 11:08:40 AM

Title: 2D Trigger not triggering.
Post by: krane on February 24, 2017, 11:08:40 AM
Looking a the drag and drop demo package, I'm wondering if there is a way to say that a dragged object (any dragged object) is on top of a dropped target?

So, what I want to say is, "there is an object on me" on a dropped target.

I can't seem to get the 2d Trigger to work.
Title: Re: 2D Trigger not triggering.
Post by: krane on February 26, 2017, 09:56:26 PM
bump? (sorry)...
Title: Re: 2D Trigger not triggering.
Post by: jeanfabre on February 27, 2017, 01:17:02 AM
Hi,

Click on "edit" in your colliders, you'll see that they do not match the size of the image or UI elements.

 It's a bad idea to mix 2d colliders and UI elements, they are not supposed to work together, prefer using just the pointer events ( using a pointer component proxy) and then check when pointer enters if a dragging is occuring, something like that.

 Bye,

 Jean
Title: Re: 2D Trigger not triggering.
Post by: jeanfabre on March 16, 2017, 06:53:49 AM
Hi,

  I found the way to do that in a reliable way, with a simple drag and drop component:

 https://twitter.com/JeanAtPlayMaker/status/842327318441910273

It's available in the uGui full proxy on the Ecosystem, the component is called "BoxCollider2dMatchRectTransform"


Bye,

 Jean