improved hasCollision in Physic.cs