playMaker

Author Topic: Parenting Object causes Trigger 2D Event  (Read 2516 times)

purbanics

  • Junior Playmaker
  • **
  • Posts: 55
Parenting Object causes Trigger 2D Event
« on: March 12, 2014, 11:06:13 AM »
Hi,

This seams like a bug. Please explain the logic behind this if it's "as designed".

I have a 2D sprite in the area of a trigger.
The FSM on the trigger has a first state with an action: "Trigger 2d Event" set to On Trigger Enter 2D.
When I run the scene this first action becomes true (is this OK?) and moves onto the 2nd state of the FSM which is again the same action: "Trigger 2d Event" set to On Trigger Enter 2D.
Now this CORRECTLY does not do anything as it is waiting for a Trigger Enter 2D Event to happen.

Now comes the possible bug: After 5 seconds I parent the 2D sprite to another game object and the previously mentioned "Trigger 2D Event - Trigger Enter 2D" runs.

Why is this?
There has not been any movement so no trigger entering should have happened.
Why does the parenting of an object result in a Trigger 2D Enter Event becoming true?

Thanks,
Peter


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Parenting Object causes Trigger 2D Event
« Reply #1 on: March 14, 2014, 07:16:22 AM »
Hi,

 Can you share this repro? I'll have a look.

bye,

 Jean

purbanics

  • Junior Playmaker
  • **
  • Posts: 55
Re: Parenting Object causes Trigger 2D Event
« Reply #2 on: March 15, 2014, 02:34:29 AM »
Oh sorry for the late reply I forgot to set notify on this topic too so I only found your reply now when checking if there is anything.

Here is the scene:

Thanks,
Peter

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Parenting Object causes Trigger 2D Event
« Reply #3 on: April 02, 2014, 07:11:53 AM »
Hi,

 You need to package your scene, else assets are missing. when you do so, make sure you don't include the playmaker.dll ( you are not allowed to redistribute it) and that's fine then.

bye,

 Jean

purbanics

  • Junior Playmaker
  • **
  • Posts: 55
Re: Parenting Object causes Trigger 2D Event
« Reply #4 on: April 02, 2014, 09:36:30 AM »
It only uses 2 sprite assets. Shouldn't the scripts work without those?
It is 1 MB but attachments are limited to max. 512kb. so I uploaded it.
You can get it from here:
http://s3.toldacuccot.hu/letoltes?sid=5c1c14ef7be69aadec78554285c029a9&file=parent.unitypackage

Thanks for looking into this.  And by the way I am not sure this is a bug or working as designed.
Please explain why it is like this.

Br,
Peter

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Parenting Object causes Trigger 2D Event
« Reply #5 on: April 07, 2014, 07:17:32 AM »
Hi,

 ok, I have the scene, but I am not sure what you are finding wrong here.

 you have two things going on, parenting on the fly and triggers. what is the expected behavior you want between parenting ont he fly and triggers, compared to what's happening currently?

bye,

 Jean

purbanics

  • Junior Playmaker
  • **
  • Posts: 55
Re: Parenting Object causes Trigger 2D Event
« Reply #6 on: April 07, 2014, 07:58:23 AM »
I just can't explain:
"Why does the parenting of an object result in a Trigger 2D Enter Event becoming true?"

Is this how it should be?
There is no movement, so why does the trigger enter event fire because of parenting the object that's in the area of the trigger?

Thanks,
Peter

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Parenting Object causes Trigger 2D Event
« Reply #7 on: April 08, 2014, 07:02:13 AM »
Hi,

 uhm I see. I would ask the forum and Unity for this, I don't know myself if it's a bug or a feature...


Bye,

 Jean