Hey all, this code snippet is from my World sub-class, and for some reason when I call the addSpider() method in my Spider class they are always turned east. I want the default rotation to be random.
public void addSpider() { Spider spider = new Spider(); if(Greenfoot.getRandomNumber(spawn) < 1) { addObject(new Spider(), Greenfoot.getRandomNumber(getWidth()), Greenfoot.getRandomNumber(getHeight())); spider.setRotation(Greenfoot.getRandomNumber(360)); } }