Is there a way I can make an object move in a circle around the center of the world at any speed (changeable int)?
int rotationalSpeed = 1;
int radius = 200; // adjust as needed
public void orbitWorldCenter()
{
setLocation(getWorld().getWidth()/2, getWorld().getHeight()/2);
turn(rotationalSpeed-90);
move(radius);
turn(90);
} public void act()
{
int cx = getWorld().getWidth()/2;
int cy = getWorld().getHeight()/2;
int speed= 5;
turnTowards(cx,cy);
int rotation = getRotation();
setRotation(rotation + 89);
move (speed);
}