Ha ha thanks, But I figured it out by myself

If anyone wants to know how, I basically did this:

(r is the player which is a circle)

1 2 3 4
| double angle = Math.atan2((double)r.getCenterY() - (double)container.getInput().getMouseY(), (double)r.getCenterX() - (double)container.getInput().getMouseX()) - Math.PI; bullets.add(new Bullet(new Circle(r.getCenterX(), r.getCenterY(), 5), angle)); r.setX((float)(r.getX()+Math.cos(b.getAngle())*b.getSpeed())); r.setY((float)(r.getY()+Math.sin(b.getAngle())*b.getSpeed())); |