Why doesn’t the indicated line work? The line is being triggered by a keypress.
I’ve tried using ‘Position’, ‘position’ and supplying a vector3 or even ‘position.x’ and supplying just a number but none works. I’ve tried addressing it as ‘/go#label’ or just ‘#label’.
According to the API reference go_set() accepts the ‘url of the game object or component having the property’ and help says ’ Apart from the properties Id , Position , Rotation and Scale the following component specific properties exist:"
What am I doing wrong?
function on_input(self, action_id, action)
if action_id == hash("touch") and action.pressed then
print("Touched")
label.set_text("#label", "Touched")
elseif action_id == hash("moveup") and action.pressed then
go.set("/go#label", "position", vmath.vector3(0, 0 ,0)) -- <--doesn't work
end
end