more developed method for collision check

Method just take location and size of the object that we want to check
for collision