I'm have a problem making an object face the mouse and the websites tutorials don't help!
function draw() {
background(0, backgroundColor2, 0);
cursor('crosshair.png')
frameRate(1000);
angleMode(DEGREES);
imageMode(CORNER)
let a = atan2(mouseY - height / 2, mouseX - width / 2);
rotate(a);
image(gun, width/2, height/2, 40, 40);
}