-------------------------------------------------------------------------------- -- Handler.......... : onMouseMove -- Author........... : -- Description...... : -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function OSVMain.onMouseMove ( nPointX, nPointY, nDeltaX, nDeltaY, nRayPntX, nRayPntY, nRayPntZ, nRayDirX, nRayDirY, nRayDirZ ) -------------------------------------------------------------------------------- if ( this.bMouseButtonDown ( ) ) then local mode = this.nControlMode ( ) if ( mode == 1 ) then -- Zoom -- object.sendEvent ( application.getCurrentUserActiveCamera ( ), "OSVCamera", "onZoomBy", nDeltaX, nDeltaY ) elseif ( mode == 2 ) then -- Pan -- object.sendEvent ( application.getCurrentUserActiveCamera ( ), "OSVCamera", "onPanBy", nDeltaX, nDeltaY ) else -- Rotate -- object.sendEvent ( application.getCurrentUserActiveCamera ( ), "OSVCamera", "onRotateBy", nDeltaX, nDeltaY ) end --[[ local x, y = hud.getCursorPosition ( this.getUser ( ) ) local b = false if ( x > 75 ) then x = 50 b = true end if ( x < 25 ) then x = 50 b = true end if ( y > 75 ) then y = 50 b = true end if ( y < 25 ) then y = 50 b = true end if ( b ) then hud.setCursorPosition ( this.getUser ( ), x, y ) --log.message ( x, " ", y ) end --]] end -------------------------------------------------------------------------------- end --------------------------------------------------------------------------------