I recently started coding in Greenfoot and I am making a simple top down shooter, I was wondering how to make an actor (In this case, a bullet) move in the direction of a mouse click. I would greatly appreciate any help I receive.


1 | Ball.turnTowards(mouse.getX(), mouse.getY()); |
1 2 3 | turnTowards(mouse.getX(), mouse.getY()); // which is equivalent to this .turnTowards(mouse.getX(), mouse.getY()); |