This callback is a bit more complicated. As there is no native way to figure out when the mouse has been moved there is a bit of weirdness happening. If you arent using CraftOS pc emulator which adds a mouse_moved event then this will get called whether an event that provides mouse coordinates get triggered, Like a click/drag/scroll, etc. If you are on CraftOS pc emulator then this will also happen when the mouse is moved in the window.


function c3d.mousemoved(x,y,change_x,change_y)
    print("The mouse has been moved to " .. x .."," .. y .. " and the position difference is " .. change_x .. "," .. change_y)