I wanted to have a shoot actor go in the direction of the mouse but I could not get the direction the mouse was in from actor need help


1 2 3 4 5 6 7 | public ShotActor() { //you should do this in the constructor. Otherwhise the bullet will follow the mouse all the time; MouseInfo mouse = Greenfoot.getMouseInfo(); if (mouse != null ) { turnTowards(mouse.getX(), mouse.getY()); } } |