Fix wall snap distance too large problem