setPosition

API -

return function()
    local app = getApp();
    local myObject = app.createGameObject();
    wait(3);
    
    local pos = app.convertPercentToPosition(0.5, 0.5);
    myObject.setPosition(pos.x, pos.y); 
    --places the object in the center of the screen
    
    --as soon as the script ends the object will be destroyed automatically.
    keepAlive();
end

Last updated