corrected edge bounce conditions to check for direction of movement
plane collision detection