Hello, I have scene with background rect and one phys object
[lua]function scene:createScene( event )
local group = self.view
Rect = display.newRect(W,H,-W,-H);
Rect.id = “rect”;
group:insert(Rect)
end
function scene:enterScene( event )
local group = self.view
ball = Ball.createBall( some params); --my phys object
function OnTouch(e)
do something
end
Rect:addEventListener(“touch”, OnTouch);
end[/lua]
why function OnTouch(e) triggered when I touch ball?
How to make that “function OnTouch(e)” triggered only if I touch Rect background, excluding all objects on it?
Sorry for my bad English, best regards, Vladimir [import]uid: 126133 topic_id: 31774 reply_id: 331774[/import]