b2CreateBody

Function b2CreateBody 

Source
pub unsafe extern "C" fn b2CreateBody(
    worldId: b2WorldId,
    def: *const b2BodyDef,
) -> b2BodyId
Expand description

Create a rigid body given a definition. No reference to the definition is retained. So you can create the definition on the stack and pass it as a pointer. @code{.c} b2BodyDef bodyDef = b2DefaultBodyDef(); b2BodyId myBodyId = b2CreateBody(myWorldId, &bodyDef); @endcode @warning This function is locked during callbacks.