title: Easy way of drawing a straight dotted line in libgdx?
body: <p>I would like to draw a straight dotted line in <em>libgdx</em> for android game between to points of the screen. </p>
  
  <p>Currently I have the following code to draw the not-dotted line, using a <code>ShapeRenderer</code>:</p>
  
  <pre><code>shapeRenderer.begin(ShapeType.Line);
  //draws normal line, would prefer it dotted...............
  shapeRenderer.line(touchPos.x, touchPos.y, someSprite.getX(), someSprite().getY());
  shapeRenderer.end();
  </code></pre>
  
  <p>I have seen <a href="https://stackoverflow.com/questions/10401644/mousejointdef-libgdx-draw-a-trajectory-line-like-angry-birds">another question about dotted lines</a>, but it is a bit of an overkill for me since I don't need it curved etc. I just need <strong>a straight dotted line</strong>, like </p>
  
  <blockquote>
    <p>...............................................................................................</p>
  </blockquote>
  
  <p>Was thinking about having a loop that just calculates the positions of the dots on the line and just draws dots there?  but is that really necessary, does anyone know a simpler way?</p>