Hi,
I have display new image1 and image2.
I’m getting collision event if i set isSensor=true for image1.
but if I group both image1, image2 and add physics to “group” with isSensor true then I’m not getting the collision events.
Code snippet:
sens = display.newImage(sensor, 30, 30)
physics.addBody( sens , “static”, {isSensor = true} ) – senor at 30,30
obj1 = display.newImage(image1, 10,20)
obj2 = display.newImage(image2, 10,40)
group:insert(obj1)
group:insert(obj2)
physics.addBody( group ,{isSensor = true} )
transition.to(group, x=50, time=3000) – both image1 & 2 are grouped and move to x=50 for collision.
Runtime:addEventListener( “collision”, onCollision )
– No Event :-(
Note: If I add physics to image1 only and move it to x=50 then I’m getting the collision event.
Sudheer