I am trying to make it so that there is a flying character that only moves left and right, move towards the hero following him, but not turning towards character, or moving down, just following him.


1 | if (hero.getX() > getX()) ... else ... |
1 | Actor hero = (Actor)getWorld().getObjects(Hero. class ).get( 0 ); |