Once you have your collision function, just add the name of your object. In this circumstance it's called object.
1
2
3
4
5
6
7
8
| -- removing an object, removes it forever:
object:removeSelf()
-- If you would like to just remove the appearance of the object you could do this:
object.isVisible = false
-- Taking away the physics of the object just in case ;):
object.isBodyActive = false |
Works!! I was looking for this in the online docs but the samples there don't work.
It says the first object should be event.object1 and the second should be event.object2. I tried it and it gives me a nil error.
Now with your example it just works great!
thanks for sharing
@adrianeraldo yeah your welcome glad this help :)