Defold
b2d
Functions for interacting with Box2D.
Functions
b2d.get_body(url: string | Hash | Url): Opaque<"b2Body"> | undefined
Get the Box2D body from a collision object
Parameters
url:string | Hash | Url— the url to the game object collision component
Returns
body:Opaque<"b2Body"> | undefined— the body if successful. Otherwisenil.
b2d.get_world(): Opaque<"b2World">
- Signature changed in Defold 1.13.2
Get the Box2D world from the current collection
Returns
world:Opaque<"b2World">— the world if successful. Otherwisenil.