Hello, I’m developing a game where I need a image following mouse position.
My code:
local function onMouseEvent( event ) my\_image.x, my\_image.y = event.x, event.y end Runtime:addEventListener( 'mouse', onMouseEvent )
But doesn’t work. Only when I click on screen.
My environment:
OS X 10.10
Corona Simulator
Build 2015.2731