Consider the following MWE:
\documentclass[border=5pt,tikz]{standalone}
\usetikzlibrary{intersections,snakes}
\tikzstyle{water} = [decorate,decoration={zigzag,segment length=3mm,amplitude=.5mm}]
\definecolor{police}{RGB}{27,128,196}
\definecolor{sirene}{RGB}{240,79,35}
\definecolor{windows}{RGB}{189,230,250}
\definecolor{tire}{RGB}{121,131,140}
\definecolor{mark}{RGB}{246,235,21}
\definecolor{star}{RGB}{242,103,34}
\definecolor{street}{RGB}{46,46,46}
\definecolor{forest}{RGB}{34,139,34}
\definecolor{deep}{RGB}{31,61,12}
\definecolor{aqua}{RGB}{107,202,226}
\tikzset{
pentagon/.style={
append after command={
\pgfextra{
\begin{scope}[shift={(\tikzlastnode)},rotate=17.5,scale=.1]
\path[name path=linie1] (72:1) -- (3*72:1);
\path[name path=linie2] (0:1) -- (2*72:1);
\path[name intersections={of=linie1 and linie2, by=s}];
\path[name path=linie3] (72:1) -- (4*72:1);
\path[name intersections={of=linie3 and linie2, by=s1}];
\path[name path=linie4] (2*72:1) -- (4*72:1);
\path[name path=linie5] (72:1) -- (3*72:1);
\path[name intersections={of=linie4 and linie5, by=s2}];
\path[name path=linie6] (0:1) -- (3*72:1);
\path[name path=linie7] (2*72:1) -- (4*72:1);
\path[name intersections={of=linie6 and linie7, by=s3}];
\path[name path=linie7] (72:1) -- (4*72:1);
\path[name path=linie8] (3*72:1) -- (0:1);
\path[name intersections={of=linie7 and linie8, by=s4}];
\draw[fill=#1] (0:1) -- (s1) -- (72:1) -- (s) -- (2*72:1) -- (s2) -- (3*72:1) -- (s3) -- (4*72:1) -- (s4) -- cycle;
\end{scope}
}
}
},
police car/.style={
append after command={
\pgfextra{
\node[minimum width=1cm,minimum height=.5cm] (a) at (\tikzlastnode) {};
\fill[windows] ([xshift=.2cm,yshift=.25cm]a.south west) -- ([yshift=-.01cm,xshift=.4cm]a.north west) -- ([yshift=-.01cm,xshift=-.24cm]a.north east) -- ([xshift=-.1cm,yshift=.25cm]a.south east);
\path[fill=police] (a.south west) -- ([yshift=.25cm]a.south west) -- ([yshift=.25cm,xshift=.1cm]a.south east) -- ([xshift=.1cm]a.south east);
\path[fill=white] ([xshift=.2cm]a.south west) -- ([xshift=.2cm,yshift=.25cm]a.south west) -- ([xshift=.9cm,yshift=.25cm]a.south west) -- ([xshift=.9cm]a.south west);
\draw (a.south west) -- ([yshift=.25cm]a.south west) --+ (.2,0) -- ([yshift=-.01cm,xshift=.4cm]a.north west) -- ([yshift=-.01cm,xshift=-.24cm]a.north east) -- ([yshift=.25cm,xshift=.9cm]a.south west) -- ([yshift=.25cm,xshift=.1cm]a.south east) -- ([xshift=.1cm]a.south east) -- cycle;
\draw ([xshift=.2cm]a.south west) -- ([xshift=.2cm,yshift=.25cm]a.south west) -- ([xshift=.9cm,yshift=.25cm]a.south west) -- ([xshift=.9cm]a.south west);
\fill[black,radius=.1] ([xshift=.2cm]a.south west) circle;
\fill[black,radius=.1] ([xshift=-.1cm]a.south east) circle;
\fill[sirene] ([xshift=0cm]a.north) -- ([xshift=.15cm]a.north) arc(0:180:.075);
\node[xshift=.05cm,yshift=-.13cm,pentagon=yellow] at (a.center) {};
}
}
},
racer/.style={
append after command={
\pgfextra{
\begin{scope}[rotate=#1]
\node[rotate=#1,minimum width=1cm,minimum height=.5cm] (a) at (\tikzlastnode) {};
\fill[windows] ([xshift=.2cm,yshift=.25cm]a.south west) -- ([yshift=-.01cm,xshift=.4cm]a.north west) -- ([yshift=-.01cm,xshift=-.24cm]a.north east) -- ([xshift=-.1cm,yshift=.25cm]a.south east);
\path[fill=black] (a.south west) -- ([yshift=.25cm]a.south west) -- ([yshift=.25cm,xshift=.1cm]a.south east) -- ([xshift=.1cm]a.south east);
\path[fill=black] ([xshift=.2cm]a.south west) -- ([xshift=.2cm,yshift=.25cm]a.south west) -- ([xshift=.9cm,yshift=.25cm]a.south west) -- ([xshift=.9cm]a.south west);
\draw (a.south west) -- ([yshift=.25cm]a.south west) --+ (.2,0) -- ([yshift=-.01cm,xshift=.4cm]a.north west) -- ([yshift=-.01cm,xshift=-.24cm]a.north east) -- ([yshift=.25cm,xshift=.9cm]a.south west) -- ([yshift=.25cm,xshift=.1cm]a.south east) -- ([xshift=.1cm]a.south east) -- cycle;
\draw ([xshift=.2cm]a.south west) -- ([xshift=.2cm,yshift=.25cm]a.south west) -- ([xshift=.9cm,yshift=.25cm]a.south west) -- ([xshift=.9cm]a.south west);
\draw (a.south west) -- (a.south east);
\fill[tire,radius=.1] ([xshift=.2cm]a.south west) circle;
\fill[tire,radius=.1] ([xshift=-.1cm]a.south east) circle;
\end{scope}
}
}
}
}
\begin{document}
\begin{tikzpicture}
\draw[scale=1.1,xshift=-.5cm,yshift=.5cm,fill=street,yshift=-2cm,rounded corners] (0,0) rectangle (10,-8);
\draw[xshift=.25cm,yshift=.25cm,fill=aqua,rounded corners,yshift=-3.5cm,xshift=1.5cm] (0,0) rectangle (2,-2);
\draw[xshift=0cm,yshift=.25cm,fill=forest,rounded corners,yshift=-3.5cm,xshift=6.5cm] (0,0) rectangle (2,-2);
\begin{scope}[yshift=-.5cm]
\draw[fill=forest,rounded corners,yshift=-6.5cm,xshift=1.5cm] (0,0) rectangle (7,-2);
\foreach \x in {1,2,...,5}
{
\fill[xshift=9.3cm,yshift=-7.7cm,deep,rotate=180] (1.3*\x,0) arc(180:360:.5) -- (1.3*\x+1,0) parabola[parabola height=1mm] (1.3*\x,0);
}
\end{scope}
\draw[ultra thick,yellow!90!black,xshift=.55cm,yshift=-2.5cm,rounded corners,dashed,scale=.9] (0,0) rectangle (10,-8);
\draw[ultra thick,yellow!90!black,yshift=-2cm,rounded corners,dashed] (5,-.5) --+ (0,-3.5) --+ (-4.5,-3.5) --+ (4.55,-3.5);
\draw[xshift=.25cm,yshift=.25cm,yshift=-4cm,xshift=1.5cm,water,blue] (.3,0) -- (1.7,0);
\draw[xshift=.25cm,yshift=.25cm,yshift=-4.3cm,xshift=1.5cm,water,blue] (.3,0) -- (1,0);
\draw[xshift=.25cm,yshift=.25cm,yshift=-4.6cm,xshift=1.5cm,water,blue] (1,0) -- (1.7,0);
\draw[xshift=.25cm,yshift=.25cm,yshift=-4cm,yshift=-.9cm,xshift=1.5cm,water,blue] (.3,0) -- (1.7,0);
\node[police car] at (5,-2) {};
\node[racer=90] at (0,-5) {};
\draw[xshift=.7cm,ultra thick,blue,opacity=.7,->] (5,-2) -- (9,-2) arc(-270:-360:.5) --+ (0,-4);
\draw[xshift=.7cm,ultra thick,red,opacity=.7,->] (-.5,-5.6) --+ (0,-.5) arc(180:270:.5) --+ (9.5,0);
\end{tikzpicture}
\end{document}
Here is the output:
My question is: How can I achieve that the cars move along the arrows, so that the officer gets the racer?



\saveboxesand then move them along the paths withdecorations.markings.... – Aug 25 '18 at 02:34