I have an ellipse moving across the screen with
ellipse(redBallX,redBallY,40,40);
redBallX = redBallX +1;
I was wondering how I would make it so that when the X value of the ball hits 50 pixels across the screen as the initial value of redBallX = 0 so when the value reaches 50 it spawns in the exact same object?
debxyz
March 17, 2020, 3:43pm
2
Hello @NotConsumable ,
Please do not start a new thread to ask follow-up questions:
I was wondering how I would make an ellipse continuously move down a x axis while maintaining it’s Y position, in better terms I am trying to make an ellipse start at one end of the canvas and continue down to the other side while spawning a new ellipse that is the exact same and movement pattern every 50 or so pixels apart from each other
This reminds me of my reply to your last post. Why do you start a new discussion?`
Please post your entire code (of program 1 and of program 2)
in program 1 still
within draw() function
ellipse(redBallX,redBallY,40,40);
redBallX = redBallX +3; // FASTER NOW
if(redBallX>=50)
redBallX = 20;
Chrisir