How to detect collision between 2 moving objects

Hey buddies I’m making a game in which there is water and boat over it. And some objetcs are falling from the sky.  First I want to detect the collision between boat and object( both are non static) and water and object(still non static). And secondly in both the cases  i.e either object collide with boat and water i want to remove the object suddenly. Please guide me regarding this.

Thank you

All you need is simple onCollision function. A good idea would be to place an ID on any objects you want to involve in the collision. 

boat.id = "boat" water.id = "water" fallingObject.id = "fallingObject"

This article can explain the rest:

https://docs.coronalabs.com/guide/physics/collisionDetection/index.html

If you need any help ask!

All you need is simple onCollision function. A good idea would be to place an ID on any objects you want to involve in the collision. 

boat.id = "boat" water.id = "water" fallingObject.id = "fallingObject"

This article can explain the rest:

https://docs.coronalabs.com/guide/physics/collisionDetection/index.html

If you need any help ask!