Make stealth horizontal in TikZ?
The simplest option is to define an auxiliary coordinate:
\coordinate (start) at ($(a.north east)!0.2!(a.south east)$);
for later use:
\draw[-stealth] (start) -- (start-|b.west);
The complete example:
\documentclass[a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{backgrounds, calc, positioning, fit}
\begin{document}
\begin{tikzpicture}
\node[draw] (a) {A node};
\node[draw,align=center, anchor=south west,xshift=0.5cm] (b) at (a.south east) {Another\\node};
\coordinate (start) at ($(a.north east)!0.2!(a.south east)$);
\draw[-stealth] (start) -- (start-|b.west);
\end{tikzpicture}
\end{document}
The result:
Note
I took the liberty to vertically align the blocks.
One solution is to create horizontal -
(and a vertical |
) to path style.
\documentclass[tikz,border=7pt]{standalone}
\usetikzlibrary{calc}
\tikzset{
-/.style ={to path={(\tikztostart)--(\tikztostart-|\tikztotarget)\tikztonodes}},
|/.style ={to path={(\tikztostart)--(\tikztostart|-\tikztotarget)\tikztonodes}}
}
\begin{document}
\begin{tikzpicture}
\node[draw] (a) {A node};
\node[draw,align=center] (b) at (2,0.25) {Another\\node};
\draw[-stealth]
($(a.north east)!0.2!(a.south east)$) to[-] (b.west)
(a) edge[|] (b.north);
\end{tikzpicture}
\end{document}