Pushing changes to the collision function so that i can just check collision with obstacles