I’ve tried to use your camera, but i’ve got a strange bug when the render script is launching.
Your sample is working, so it’s a problem with my project, but i don’t understand.
The problem is in the script
camera.lua, required by the renderer script.
For narrowing the issue, i’ve made a debug project: britz_camera.zip (6.9 KB)
git clone defold-orthographic
orthographic directory to my new project.
adding to game project the collection, the input binding and the render found in
At this step, i already have the error:
ERROR:SCRIPT: orthographic.camera:15: attempt to perform arithmetic on local ‘DISPLAY_WIDTH’ (a nil value)
Same problem with DISPLAY_HEIGHT.
sys.get_config(…) returns nil !
local DISPLAY_WIDTH = tonumber(sys.get_config("display.width"))
local DISPLAY_HEIGHT = tonumber(sys.get_config("display.height"))
(the script is working if i assign numerical values to
I don’t understand, because your sample is working.
Thank you for reading