Hi, i have this code:
onPlayerCollision = function(event) print("col") end ... player.collision = onPlayerCollision player:addEventListener( "collision", player ) ... tmp = display.newGroup() right = display.newRect(tmp, ... physics.addBody( right, { density=1.0, friction=1.0, bounce=1.0 } ) right.bodyType = "static" right:addEventListener( "collision", right ) ... transition.moveTo( tmp, { y=display.contentHeight+baseY\*20, time=4000 } )
Can somebody tell me why my collission event won’t work?