On this page

b2d

Functions for interacting with Box2D.

Functions

b2d.get_world(): Opaque<"b2World">

Get the Box2D world from the current collection

Returns

  • world: Opaque<"b2World"> — the world if successful. Otherwise nil.

b2d.get_body(url: string | Hash | Url): Opaque<"b2Body">

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"> — the body if successful. Otherwise nil.