im trying to make a game where an ant is chasing lots of other small and im trying to make them face away and i don't know how
any ideas?


1 2 3 4 5 6 | Ant a = new Ant(); int x = a.getX() - getX(); int y = a.getY() - getY(); r = Math.toDegrees(Math.atan2(x, y)) - 270 ; setRotation(-( int ) r); move(...speed...); |
1 2 3 4 5 6 | Ant a = new Ant(); int x = a.getX() - getX(); int y = a.getY() - getY(); [b] int [/b] r = Math.toDegrees(Math.atan2(x, y)) - 270 ; setRotation(-( int ) r); move(...speed...); |