Refined collision detection to allow moving up to an object. Made animation dependent on framerate.