Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: 2501 on December 18, 2017, 12:12:35 PM

Title: "Send event" followed by "Mouse Pick Event"
Post by: 2501 on December 18, 2017, 12:12:35 PM
Hi there!

So I have this state with a "send event" with broadcast all, exclude self and only once (no every frame), followed by a "mouse pick event" that says wait for mouse off or mouse down.

But the "mouse pick event" is ignored and runs through the "mouse off" event even if the mouse has not moved an inch. Or pixel. Or something really smallish.

Any ideas?


thanks in advance,
J.
Title: Re: "Send event" followed by "Mouse Pick Event"
Post by: Deek on December 19, 2017, 02:21:38 PM
The problem doesn't lie within the "Send Event" action (so you can ignore that one), but with how the "Mouse Pick Event" functions: It only checks where your mouse is currently at and sets that in relation to the specified GameObject.
If the raycast that gets shot from your current mouse position hits a collider/trigger on that GameObject, it fires the 'Mouse Over' Event, in any other case it fires 'Mouse Off' (the 'Mouse Down' and 'Mouse Up' events can also only fire when the mouse is currently over that GO).
It fires 'Mouse Off' whenever it can't detect the GameObject, which can be caused by several things:
So you should really only use the 'Mouse Off' event option when you are certain that the mouse is currently over the desired GameObject and want to detect if it moved away from it.
Title: Re: "Send event" followed by "Mouse Pick Event"
Post by: 2501 on December 21, 2017, 02:35:38 PM
Hey Deek

Thanks for the reply! I'll try different layers next. We're using it for mouse over and info-texts on objects in an adventure game and tried to use the Send Event as a workaround the problem with templates and hierarchy objects. It works on our small scale.

J.