Gain Access to Box2D Objects from C?

Desiring Q-like powers, I searched for a way to change the gravitational constant of the universe. Unfortunately, my search produced only bitter disappointment.

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?

2 Likes

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).

2 Likes

You can set the world gravity in the project settings. :slight_smile:

1 Like

Thanks, but I’d actually like to change gravity dynamically at runtime. Unfortunately, the project setting is only modifiable at build time.