Loop around node in state diagram

I have a feeling this should be simple, but I can't find how to do it. I'm trying to draw an arrow looping around the corner of a node in a state diagram. I have the following, but as you see it cuts the corner, plus ideally the arrow would loop from nearer the corner.

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\pagestyle{empty}

\begin{tikzpicture}[%node distance = 15mm and 300mm,
node/.style={
draw,
rectangle,
text width=25mm,
text centered,
minimum height=20mm
},
arrow/.style={
very thick,
->
}]

\node[node] (state) {State};

\draw [arrow] (state.south)  to [out=270, in=0]  (state.east);

\end{tikzpicture}
\end{document}


-
Something like \node [draw] {a} edge [in=-10,out=-55,loop] (); ? – percusse May 14 '12 at 14:36

You have several possibilities: you can use the .. controls .. syntax, or the out=<value>,in=<value>,loop options perhaps combined with an appropriate looseness, or (as Jake suggested) you can use and arc to get a proper circle arc:

\documentclass{standalone}
\usepackage{tikz}

\begin{document}
\pagestyle{empty}

\begin{tikzpicture}[%node distance = 15mm and 300mm,
node/.style={
draw,
rectangle,
text width=25mm,
text centered,
minimum height=20mm
},
arrow/.style={
very thick,
->
}]

\node[node] (state) {State};

\draw[red] [arrow] (state.270) .. controls  (0.5,-3) and (3.5,-1) ..  (state.0);
\draw[blue] (state) edge [out=270,in=0,loop] (state);
\draw[green] (state) edge [out=270,in=0,loop,looseness=4] (state);
\draw [arrow] (state.south east) ++(-0.75cm,0pt) arc [start angle=-180, end angle=90, radius=0.75cm];

\end{tikzpicture}

\end{document}


-
Great thanks, still new to tikz but I'm starting to see how it all works now... – Chris May 14 '12 at 15:08