Skip to main content

b3CreateBody

Function b3CreateBody 

Source
pub unsafe extern "C" fn b3CreateBody(
    worldId: b3WorldId,
    def: *const b3BodyDef,
) -> b3BodyId
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} b3BodyDef bodyDef = b3DefaultBodyDef(); b3BodyId myBodyId = b3CreateBody(myWorldId, &bodyDef); @endcode @warning This function is locked during callbacks.