This is something I have been wondering about karma for quite some time. I have been told that intention is what matters when one does an action but what about when I know that a side effect of my intention will cause harm. For example when I intend to drive my car to work and I hit many insects along the way- I am aware that I will kill insects but this is not my intention, yet in a way I do intend to kill insects now that I know it is a side effect of driving.
The insect thing would seem similar to intending to feed myself and so I kill an animal. Of course there are other ways to feed myself but there are also safer options for transport.