hello, can i know how to get mouse coordinate everytime mouse is hovering in game screen
my code is like this but it’s doesn’t work
function init(self)
msg.post(".", "acquire_input_focus")
msg.post("@render:", "use_fixed_projection", { near = -1, far = 1 })
end
function on_input(self, action_id, action)
if action_id == nil and action.x and action.y then
local pos_x = action.x
local pos_y = action.y
label.set_text("/board#label", pos_x + ", "+pos_y)
end
end
I trying many ways in same topic in defold forum but none of this work
Can you see the actual label? I note you’ve set the rotation to be 146, when trying that myself it looks very squished. If you set a value in the label using the editor and stop using this script, do you see the label in your build?
Looks like this issue is just in main.collection, so perhaps you can delete things like images just to share a minimal version of the project. Also delete the build folder.
well actually when i am create gui component and create template using that gui the engine is not responding. and I force close it using windows task manager.
maybe i start the project from beginning sorry to bothering you