title: Easy way to detect if sprite was touched?
body: <p>I have two sprites and they need to be touched at the same time so I made two Vector2 xy and xy1.</p>
  
  <pre><code>//xy = x and y coordinate of pointer 1
  //xy1 = x x and y coordinate of pointer 2
  
  //faces is the class for the sprites
  
   if(xy.x &gt;= faces.faceSpr.getX() &amp;&amp; xy.x &lt;= faces.faceSpr.getX() + faces.faceSpr.getWidth() &amp;&amp;               //detecting if xy and xy1 are inside the sprites
                      xy.y &gt;= faces.faceSpr.getY() &amp;&amp; xy.y &lt;= faces.faceSpr.getY() + faces.faceSpr.getHeight() &amp;&amp;         //*
                      xy1.x &gt;= faces.faceSpr1.getX() &amp;&amp; xy1.x &lt;= faces.faceSpr1.getX() + faces.faceSpr1.getWidth() &amp;&amp;     //*
                      xy1.y &gt;= faces.faceSpr1.getY() &amp;&amp; xy1.y &lt;= faces.faceSpr1.getY() + faces.faceSpr1.getHeight())      //*
                  score += 1;
              else if(xy1.x &gt;= faces.faceSpr.getX() &amp;&amp; xy1.x &lt;= faces.faceSpr.getX() + faces.faceSpr.getWidth() &amp;&amp;        //*
                      xy1.y &gt;= faces.faceSpr.getY() &amp;&amp; xy1.y &lt;= faces.faceSpr.getY() + faces.faceSpr.getHeight() &amp;&amp;       //*
                      xy.x &gt;= faces.faceSpr1.getX() &amp;&amp; xy.x &lt;= faces.faceSpr1.getX() + faces.faceSpr1.getWidth() &amp;&amp;       //*
                      xy.y &gt;= faces.faceSpr1.getY() &amp;&amp; xy.y &lt;= faces.faceSpr1.getY() + faces.faceSpr1.getHeight()) 
  </code></pre>
  
  <p>I haven't tested yet if this code works, is there an easier and better way of doing it?  </p>
  
  <p>EDIT:</p>
  
  <p>I tried to use getBoundingRectangle() method and it works but I have problem on setting it's postion.</p>
  
  <pre><code>sprite.getBoundingRectangle().setPosition(x,y);
  // then I check if it works
  System.out.println(sprite.getBoundingRectangle().getPostion);
  </code></pre>
  
  <p>but the result is always 0.0, 0.0</p>