circle
inline fun BodyDefinition.circle(radius: Float = 1.0f, position: Vector2 = Vector2.Zero, init: FixtureDefinition.(CircleShape) -> Unit = {}): FixtureDefinition
Utility builder method for constructing fixtures with CircleShape.
Return
FixtureDefinition with Fixture properties.
Parameters
radius
radius of the CircleShape. Defaults to 1f.
position
offset of the circle position in relation to the body center. Defaults to (0f, 0f).
init
inlined. Allows to modify FixtureDef properties. Receives CircleShape as first (it
) argument.
inline fun Body.circle(radius: Float = 1.0f, position: Vector2 = Vector2.Zero, init: FixtureDefinition.(CircleShape) -> Unit = {}): Fixture
Utility builder method for constructing fixtures with CircleShape.
Return
a fully constructed Fixture with CircleShape.
Parameters
radius
radius of the CircleShape. Defaults to 1f.
position
offset of the circle position in relation to the body center. Defaults to (0f, 0f).
init
inlined. Allows to modify FixtureDef properties. Receives CircleShape as first (it
) argument.