I was try to destroy one object which is come from top side and if it’s touch to other object from bottom side then top object is destroy.
i was taking both are as static bodyType , if one of them are dynamic then it destroy .
so it is possible to destroy if both are static ?
if yes then how ?? [import]uid: 11428 topic_id: 4334 reply_id: 304334[/import]
– *******************************
code for circle move from top to bottom side
– ********************************
– Add collision listeners to object
local function onTouchCollision ( self , event )
local t = event.target
– if object touch beam then is hide
if ( event.other.name == “beam” and self.name == “circle”) then
self.isVisible = false
end
return true
end
– Set table listeners in each to check for collisions
obj.postCollision = onTouchCollision
obj:addEventListener( “postCollision”, obj)
static object’s dont collide. it’s in the docs. but if you set them to “isSensor=true” you should get a collision event [import]uid: 6645 topic_id: 4334 reply_id: 13679[/import]