The “problem” is that you are using RenderCam but you are not providing a correct translation from mouse position to world position for your cursor. This is mentioned in the cursor documentation:
You need to forward converted coordinates. Disable the “acquire input focus” checkbox of the cursor.script and update your controller.script like this:
local rendercam = require "rendercam.rendercam"
function init(self)
msg.post(".", "acquire_input_focus")
end
function on_input(self, action_id, action)
local pos = rendercam.screen_to_world_2d(action.x, action.y)
action.x = pos.x
action.y = pos.y
msg.post("#cursor", "input", { action_id = action_id, action = action })
end