Mouse pressed on actor but not its shape

corbanwolf

  • Posts: 223
Hey.
I got an event when mouse pressed on an actor. But this actor actually has weird shaped actor shape. Like a control in circle shape with circle shape shape, but this event registers mouse clicks like on a rectangle. Is it possible to add to stencyl an option that event when mouse pressed on actor would take its shape into account while registering the mouse pressed?
For now I can just create an actor 1x1 pixel in the middle of mouse touch and then detect whether this 1px actor collides with that shale of a control.
♪♪♪♪♪♪

Luyren

  • *
  • Posts: 2802
Check the pixel of the actor image the mouse was clicked on. If it is not transparent, execute your code. If your collision shape is close to the actor's image, that should do the trick.
My Stencyl resources are available here: https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.

corbanwolf

  • Posts: 223
Ok thanks, I'll try this
♪♪♪♪♪♪