Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - purbanics

Pages: [1] 2 3 4

Please check this and explain why this is like it is and if this is a bug or not.

Make a "big" trigger with an FSM that does nothing simply waits for
Custom global events.

Have a "small" object inside it that causes these to trigger.

Now while the game is running move the trigger around just slightly so the "small" triggering object stays inside the trigger and observe the log that it is flooded with OnTriggerEnter2D events.
I think it should only contain OnTriggerStay2D events because the triggering object has never left the area of the trigger.
Also when moving the trigger away from the triggering object no OnTriggerExit2D event happens.

If I let go of the trigger and move the object around everything works as expected: there is an ENTER when it enters, continous STAY while in the area of the trigger and one EXIT when moved away.

Why is this?
Are you not allowed to move triggers? :o


PlayMaker Help / Re: Is it possible to rename a global event?
« on: April 13, 2014, 05:26:14 AM »
This is currently disabled until a proper solution is found to solve issues with renaming globalls and corrupt fsm as a result, so hopefully next version of PlayMaker will allow this function back.

Hi Jean,

Any news about when the next version with this fix can be expected?


No, storing the finger ID is on the "touch1.png" these 2 are about how you return from the "do something" states  to waiting for click(mouse) OR touch(finger).


:-) Now that's why an expert needs to check it. Thanks Jean, I forgot to mention that.
I was so focused on showing the touch began stuff (I DO save the fingerID there) that I did not pay attention to also show what is in the "do something" states.

As Jean explained you don't just do something there but also watch for the same fingerID ended and canceled states to stop doing your thing when that particular touch ends.

This is how it's set up for mouse and the touches:

You are welcome! I'm glad you find it useful.

I hope others with more experience also take a look and maybe propose some improvements or even a way better solution to solve this.


I asked in the Unity forum.
I'll post here when there is any new information about this.


Hi David,

You could have several FSM running on one "empty" object doing the mouse and touch stuff, or you can have a separate empty object for each, like I have.
You would then have to either disable just an FSM or a complete object when building for touch devices. (the one with the mouse things)

On the attached 2 images you can see my wiring (I removed all the unnecessary stuff) for the mouse interaction and on the 2nd image you can see the wiring for the touch with ONE TOUCH COUNT.
All you need to do to have multiple touches is to duplicate that and modify that one value to 2,3, etc. that I indicated in the shot.


That's pretty disappointing that the Physics2D.GetRayIntersection does not take the ordering layer into account.

So it seams that even when using Unity 2D, you can't forget about the Z depth... yet.


PlayMaker Help / Re: Parenting Object causes Trigger 2D Event
« on: April 07, 2014, 04: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?


PlayMaker Help / Re: [SOLVED] "Get Tag Count" with every frame
« on: April 07, 2014, 03:17:25 AM »
You could also try the Next Frame Event:


Please give me some info about this.

Thanks in advance,

Hi David,

I am just learning too as I go along.
First went through all the tutorial video series:

Then started figuring things out on my own. Of course making lots of mistakes and not so optimal stuff along the way and learning what's required (like some vector math) for the ideas I'd want to prototype.

What is that "same thing" exactly you'll need shortly? Is it the multi touch moving of things around?
I could show that in one image if that's the thing.


PlayMaker Help / Re: Needs unity restart to work as designed
« on: April 03, 2014, 10:44:56 PM »
First I thought it would take a lot of time to create a version of my project that only contains this small problematic part, but then it wasn't such a big thing.
But I would still like to only send it to your personal email instead of posting here, so I sent you a message...


PlayMaker Help / Re: Needs unity restart to work as designed
« on: April 02, 2014, 08:05:23 AM »
Yeah, can repeat it every time:

1. make a copy of that object,
2. test and see that it does NOT follow the parent perfectly, (lags behind)
3. reload the level (Unity restart is actually not required),
4. then when testing it follows the parent perfectly now.


PlayMaker Help / Needs unity restart to work as designed
« on: April 02, 2014, 08:01:29 AM »

I'll explain the problem (that's solved by a restart) but hopefully somebody can explain why this is like it is, because it can cause some headaches before this restart requirement is figured out.

I made an FSM that moves the owner object around so it follows the parent it is attached to. (just get position and set position in every frame)
Then when I tested it I noticed that as I move the parent around this object would only follow it with some lag/jittering. I thought that well I'll have to live with that, probably the scripts run slowly or something.

But then I was happily surprised to noticed that (after a restart) now the object follows the parent perfectly, no jittering or lag. Could not explain what caused it to now work as intended.
Then as I need more of these objects I copied it 3 times and renamed the new ones.
Then when testing I saw that the original one still works perfectly (follows the parent exactly) but the new three do the same lagging/jittering behind.
I checked a few things but could not figure out any reason why this could be. They are all the same.

So then I decided to restart Unity to check after that, maybe...
And voila, now they all follow the parent perfectly.

Do the variables I use in them (all local but named the same) need to be reinitialized? or something, so they don't interfere? with each other?

Any idea why this is so?

The more I use PlayMaker the more interesting things pop up.  ;)


Pages: [1] 2 3 4