Rotate arc in pacman animation

As you can see above, you are applying my idea of code…applying a bucle for from 0 to 90º…and step of one degree…but it doesnt work…it stills point to the right and make waka waka…

These would be a project for my students… you can see a project of a couple of years ago…

When pacman changes direction, we change the image…we have the four pacman images looking right, left, up and down… and we have some images to make waka waka bite… I dont remember right now…

I was remembering code and “getting back to p5.js”…so i come across the pacman bite using arc…and seemed interesting…

As general idea i have a pacman class, with attributes and methods. Main methods would be moveRight, moveLeft, moveUp and moveDown…and attributes like direction, lives, score and the most important coordX and coordY…
So when left arrow would be pressed → pacman would go left → depends on the direction it was taking we have to do the smoothly transition…then use animation going left…

Thanls

1 Like