I'm working on making a football game, but it does not manage to get the ball With the player. system indicates failure in coordination X.
public void terugKaats()
{
Actor actor = getOneIntersectingObject (Tegenstander1.class);
if (actor != null)
{
actor.setLocation(actor.getX() + (x - getX()), actor.getY() + (y - getY()));
}