i want an object(car) get a score if it close to another object ( not touching )
the size of the car = 36 x 77
andthe size of the mobil/mobil2 = 32 x 75
i already try with other cordination
its really this code to use it ? or is there another method ?
private void scorePoint()
{
Actor actor = getOneObjectAtOffset(40, 80, Mobil.class);
Actor actor2 = getOneObjectAtOffset(40 , 80, Mobil2.class);
if(actor != null )
{
counter.add(1);
}
if(actor2 != null)
{
counter.add(2);
}
}
