The meaning is almost the same, but it seems to me that を often has a nuance of "intentionally/volitionally", and に can be used for "accidentally". The following thread might be somewhat helpful.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.