can anyone help me out with that ? How to make the balls bounce off a object in random directions.
public void act()
{
move(5);
if (isTouching(NameOfTheClass.class))
{
setRotation(Greenfoot.getRandomNumer(360));
}
}