Modern torpedoes use an umbilical wire, which nowadays allows the computer processing-power of the submarine or ship to be used.
Why do torpedoes have wires?
Guidance Wire For TorpedoesThe guidance wire acts as a medium for communication of data between the torpedo and the firing platform (ship or a submarine}. The wire is also a medium for communicating data for the guidance of the torpedo towards target during its underwater run.
Do all torpedoes have wires?
In addition, many modern torpedoes have a command wire or fiber optic cable that reels out from behind the torpedo and establishes a data link with the submarine's fire control system.