Student Wants sprite to move diagonally and grow slowly

var baseball = createSprite(50, 360);
baseball.scale = 0.10;
function draw() {
ellipse(0, 400, 300, 300);
baseball.scale = baseball.scale + 0.10;
baseball.y = baseball.y - 1;
baseball.x = baseball.x + 1;

Here is the code for what we have tried. What happens is the baseball grows too quickly and doesn’t seem to be moving diagonally from the bottom left corner towards the top right corner.


Good morning! The scale increasing by .10 (10%) each time through the draw loop will cause it to grow at a very fast rate. Try a much smaller value on that line (like 0.001) and see if that helps!

You may also want to try making the baseball.y and baseball.x values increase more quickly (like using 2 instead of 1), but once you change the scale value to a smaller number, I’m sure the other adjustments will be pretty obvious.

Let us know if we can help any more!