Using your code @Chung_Xa :
(I’ve included the library defold-orthographic to this project)
local function get_actual_size()
local display_width = sys.get_config_int("display.width")
local display_height = sys.get_config_int("display.height")
local window_width, window_height = window.get_size()
local sx = window_width / display_width
local sy = window_height / display_height
local scale = math.min(sx, sy)
return {
width = scale == sx and display_width or window_width / scale,
height = scale == sy and display_height or window_height / scale,
}
end
msg.post( "camera", "use_projection", { projection = hash("FIXED_AUTO") })
local actual_size = get_actual_size()
local bottom_left = vmath.vector3(-actual_size.width / 2, -actual_size.height / 2, 0)
go.set_position(bottom_left, "go1")
I get this:
The game object I’m trying to position in the bottom-left corner have this sprite:(both have 0,0,0 in their initial positions)
As you can see is not exactly in the corner, but a little up-wards in y axis.