Added correct collision handling so that objects will slide along blocks rather than just stopping