Create collisionDetection.js

Function for collision detection between two objects