//
Actor coll = getOneIntersectingObject(Player.class); if(coll != null){ pointAtObject(coll); }
Player coll = (player)getOneIntersectingObject(Player.class); if(coll != null){ pointAtObject(coll); }
public void pointAtObject(Actor o) { setRotation((int)(180*Math.atan2(o.getY()-getY(),o.getX()-getX())/Math.PI)); }
Player p = (Player) getWorld().getObjects(Player.class).get(0); pointTo(p);