actor gets mouse click
TwistedMech
Member Posts: 408
Hi
On the cannon demo, I created an actor and placed it top right corner of the camera. It is a button to change scene to main menu. In the actor there is a rule to wait for mouse click before it performs the scene change. It seems to pick up a global mouse click event (fire cannon ball) but it makes sense that the actor gets the event if it is the object being clicked?
Any work around to allow the actor being clicked to get the mouse click event only?
On the cannon demo, I created an actor and placed it top right corner of the camera. It is a button to change scene to main menu. In the actor there is a rule to wait for mouse click before it performs the scene change. It seems to pick up a global mouse click event (fire cannon ball) but it makes sense that the actor gets the event if it is the object being clicked?
Any work around to allow the actor being clicked to get the mouse click event only?
Comments
You need to add another condition to your rule for that actor.
Click the little plus sign in the rule to add another condition.
you need to add the condition that the mouse POSITION needs to be INSIDE the actor.
so you'll end up with two conditions:
when MOUSE button is DOWN
when MOUSE POSITION is INSIDE
go to the main menu.
Hope this helps!