gettouch()

Description
When called, gettouch() updates the current mouse coordinates in mouseX and mouseY. Typically gettouch() is called inside of a loop.

Syntax


gettouch()


Parameters
none

Returns
none

Example
void setup(){
fill(255);
}

void loop(){
gettouch(); //stores mouse coordinates in mouseX and mouseY
ellipse(mouseX, mouseY, 20,20); //draws an ellipse at the touch location
}

Related
mouseX
mouseY
touch_getCursor()




Edit History