Mouse relative to Translations and Scale

Hello. I am trying to access the mouse position through mouseX and mouseY within a keypressed function, but I have translations and scales in the draw function of my sketch, and I think this is causing me to get a mouse position that I do not want within keypressed.


Look at screenX please —- in a 3D Sketch

1 Like

I don’t think p5.js has screenX.

You might be interested in this past thread:

…and possibly the approaches used in this Java library: