gaMouseY()

Syntax

gaMouseY()

Example

posX = 0
velX = 0
 
function update()
 // creating here a velocity range from 0 to 100 (pixels x frame)
 velX = (gaMouseX()/OUTPUT_W) * 100
 // updating the X position
 posX += velX
 
 if posX > OUTPUT_W then
 posX = 0
 end
end
 
function draw()
 gaBackground(0.0,1.0)
 
 ofSetColor(255)
 ofCircle(posX,gaMouseY(),167)
 
 ofNoFill()
 ofSetColor(255,0,0)
 ofCircle(gaMouseX(),gaMouseY(),20)
 
 ofSetColor(255)
 info = string.format("X:%d - Y: %d - Velocity: %d",gaMouseX(),gaMouseY(),velX)
 ofDrawBitmapString(tostring(info),gaMouseX()+30,gaMouseY())
end

Description

This function is a common mouse input detection returning the Y position over the GAmuza output window.

Returns

«Int, The numeric value of the last Y position of the mouse over the GAmuza output window