I don’t know Lua or Defold particularly well, but I do know that Lua has a C API, which got me wondering wether there is any way to access the Box2D World so that I can set the gravity “manually”? How is the Defold extension project coming along? Is there at least a Defold C API?
No, there is no access to the internal structures or the Box2D world at this moment.
The extensions are coming along fine. You can find the Defold SDK reference documentation here: http://www.defold.com/ref/ It’s listed under DEFOLD SDK (ALPHA).