Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: nrefzen on March 13, 2014, 01:26:50 PM

Title: Object specific action is activated even if i click somewhere not on the object
Post by: nrefzen on March 13, 2014, 01:26:50 PM
I'm new to Unity and Playmaker. I was working on a project, the idea is to have a room where if you click on an object (see image attached) the result will be a switch to a different camera, a second click on the object will result in a simple action for the object, for example, the laptop rotates. A third click would return to the main camera.

I have added a FSM to a specific object, using GET MOUSE BUTTON DOWN, to facilitate this. I'm able to get the camera change, action and return to original state working. However I want this to only happen when I click on the object. Instead if I click anywhere on the scene the action still happens. If i Add FSM to another object, it overrides the previous action and only the new FSM works.

Where am I going wrong, how can i make sure the action only takes place when i click on the object only.

Any help would be gratefully appreciated. Please let me know if any more data will be useful.
Title: Re: Object specific action is activated even if i click somewhere not on the object
Post by: Lane on March 17, 2014, 12:38:23 PM
You can use Mouse Pick for this, store the object, do a compare and send the event you want.
Title: Re: Object specific action is activated even if i click somewhere not on the object
Post by: jeanfabre on March 18, 2014, 10:11:29 AM
Hi,

 also, are you sure you are only receiving mouse events on the object you clicked, and not a general mouse click, unrelated to what's beneath it?

bye,

 Jean