Depends on any agreements. Different companies approach maintaining their talent and intellectual property differently. Non-compete agreements and non-disclosure agreements are the territory of lawyers and outside our scope - if you have signed these, see a lawyer. Typically non-disclosure is far easier to work with as it is about sharing what you know... the only tricky area is if you are asked, after your job change, about intellectual property of your old company.
The more cogent question is the personal level. People take their work personally. Normally it's a good thing - it's what inspired dedication and camaraderie. But it can also inspire spite and vindictiveness. How it plays out in the mental processes of your bosses and colleagues is anyone's guess. Normally the amount of irritation is somewhat related to the elegance with which you leave - don't leave when it would kill a huge effort that comes due very soon, don't leave without doing appropriate closure activities with your boss, don't be so gleeful about leaving that you are hard to be around. All of that is true whether you leave for a competitor or for a new type of business. My thought is that leaving for a competitor tends to amplify negative emotions in some folks.
You didn't ask, but I'll point out, that my experience in different lines of business is that competitors in a locality often optimize for the same basic outcome, which makes the working environments more similar than different. This improves your ability to feel at home on day 1, but decreases the likelihood of a drastically new work experience.
If you are leaving because you know that you'll work on brand new technology --today-- then maybe you get the change you want... but if you are leaving because "the new company would never force me to let my skills deprecate the way my current company does" - think again, that kind of long term cultural value only exists when there's profit in the competitive space from having that value... if these two companies are competing they are optimizing for the same thing.