how do electric and magnetic forces act on different objects