Error with Orthographic Camera in Mobile Template

When I add the Orthographic Camera extension to my project, I get the following error every time I run the game:

ERROR:SCRIPT: builtins/render/default.render_script:72: bad argument #1 to ‘__mul’ (matrix4 expected, got nil)
stack traceback:
[C]:-1: in function __mul
builtins/render/default.render_script:72: in function update_camera
builtins/render/default.render_script:92: in function update_state
builtins/render/default.render_script:257: in function <builtins/render/default.render_script:250>

I confirmed that this only happens with the mobile template, the error does not appear in the empty template. It doesn’t seem to break anything so far, and I don’t know enough about Defold to know what the error means.

To Reproduce

Like I said, I don’t understand the implications of this error. I required the module elsewhere in my project and the functions worked fine.

I’m using Defold 1.12.3, running Linux Ubuntu 24.04. Minimal project attached.

Mobile Game.zip (746.8 KB)

If I’m not mistaken, you have to change default.render to orthographic.render in game.project → Bootstrap → Render.

1 Like

well I’ll be. Error is gone.

Perhaps this should be added to the installation instrctions on Github

I tried to reproduce it using the steps above but I did not get an error.