GSDP:GAM100/CProcessing/worldMouseY

From Inside
Jump to: navigation, search

worldMouseY

Description

The system variable worldMouseY always contains the current vertical coordinate of the mouse in world space. This means that the mouse position will be translated by any transformation functions called (translate() , scale() , scaleX() , scaleY() , rotate()). This will track the position of the mouse anywhere on the screen, even if the window is in the background.

Example

void draw() 
{
  background(color(200, 200, 200, 255));
  translate(mouseX, mouseY);
  line(0, 0, worldMouseX, worldMouseY);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>