Author Topic: FlxSprite angle + Mouse interaction  (Read 1044 times)

anndorian

  • New Member
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
FlxSprite angle + Mouse interaction
« on: Thu, Dec 8, 2011 »
Ok, so I have a image loaded ( png ) that is 200x20 px.

When I click on the image the angle changes to 90/180 .. and so on.

Now comes the weird thing, if the angle is 90 degrees and I click the zone where the image was while horizontally it turn out I can still click the image even if there's nothing there.

I even tried using loadRotatedGraphic() but it's the same... any solutions ?

Thanks.

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: FlxSprite angle + Mouse interaction
« Reply #1 on: Fri, Dec 9, 2011 »
Yeah it does the click against the bounding box, not the sprite pixels. Turn on the debugger and object outlines, you'll see the green line around the sprite = the bounding box. For that you could use my power tools for a pixel precise click check.
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius