mouse click registers outside of actor
Greetings,
I have an interesting problem where my mouse clicks are registered everywhere in the scene NOT just on the actor.
I have created a very simple game that contains one actor that is placed in the middle of the scene. The actor has one rule "when actor receives event" "mouse button" "down" and one behavior "rotate".
If I click anywhere in the scene my actor rotates. I would expect my actor to rotate only if I click on the actor but this is not the case.
Any help is appreciated.
Thanks, fdc
I have an interesting problem where my mouse clicks are registered everywhere in the scene NOT just on the actor.
I have created a very simple game that contains one actor that is placed in the middle of the scene. The actor has one rule "when actor receives event" "mouse button" "down" and one behavior "rotate".
If I click anywhere in the scene my actor rotates. I would expect my actor to rotate only if I click on the actor but this is not the case.
Any help is appreciated.
Thanks, fdc
Comments
Try Touch instead of mouse button. It works that way.
Edit - I beat Ace to it, now it's gonna goto my head :P
Ace
Its exactly how it should be
Think about it , you tell your actor to do something when the mouse button is down , then when you preview your game , and press the mouse button (it is down now), It does what you told him to do
If you want your actor to trigger only when you press inside him you can use 1 out of 2 methods :
1) when touch is pressed (recommended)
2)when mouse button is down AND when mouse is inside .
EDIT :
AArrrrr ACE beat me !
Cheers
Roy.