b2d_body_create_circle(world,radius)
Jump to navigation
Jump to search
Description
Creates a new physics body in the given world with and generates a fixture with the given shape. This is only a convenience function, it is more optimal to reuse shape objects that are of the same size instead of generating one for each body.
Parameters
Parameter | Data Type | Description |
---|---|---|
world | integer | index of the world to create the body in |
radius | double | The radius of the bodies fixture circle shape. |
Return Values
integer: Returns the index of the newly created body.
Example Call
// demonstrates creating a physics body with a fixture and circle shape
mybody = b2d_body_create_circle(myworld, 8);