Hi, I’m trying to display a text message when you mouse over an image.
I can manage to display a text message at the position set in the prefab object, but cannot display it at the position specified in factory.create().
The code below is “main.script”.
function on_input(self, action_id, action)
if action_id == nil then
if self.explanation == nil and action.x > 600 and action.x < 700 and action.y > 350 and action.y < 400 then
local p = vmath.vector3(action.x, action.y, 0)
self.explanation = factory.create("#testfactory",p)
elseif self.explanation ~= nil then
print("explanation:",self.explanation)
go.delete(self.explanation)
self.explanation = nil
end
elseif action_id == hash("touch") and action.pressed then
print("Touch!")
end
end
Thanks for your help!