Hi ive been reading the tutorial or example were you make an animation of a pacman bit opening and closing the mouth
The code:
function draw() {
background(0);
// Style the arc.
//noStroke();
fill(255, 255, 0);
// Update start and stop angles.
let biteSize = PI / 16; //smaller the denominator, bigger the bite
let startAngle = biteSize * sin(frameCount * 0.1) + biteSize;
let endAngle = TWO_PI - startAngle;
// Draw the arc.
arc(50, 50, 80, 80, startAngle, endAngle, PIE);
rotate(90);
}
As you can see im trying to rotate the pacman, in order to move to the left, up and down… This animation is for moving right… how can i do it ? The best way ??