It looks like you're new here. If you want to get involved, click one of these buttons!
--[[ Sprite1 -> parent: stage ↳ Sprite2 -> parent: Sprite1 ↳ Sprite3 -> parent: Sprite2 ↳ Sprite4 -> parent: Sprite3 ↳ px -> parent: Sprite4 ]] local t = {} for i = 1,4 do local cont = Sprite.new() t[i] = cont if i > 1 then t[i-1]:addChild(cont) else stage:addChild(cont) end end local px = Pixel.new(0,1,32,32) t[4]:addChild(px) t[1]:setVisible(false) stage:addEventListener("mouseDown", function(e) print(px:hitTestPoint(e.x,e.y,true)) end) |
shapeFlag: (bool) Take hidden, clipping/masking into consideration when testing hit point optionalSo the questions are: Is it a bug? How to fix it?)
Comments
Likes: SinisterSoft, antix
meanwhile:
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: MoKaLux
Likes: PaulH