pointsToBody

fun pointsToBody(points: List<Vector2>, radius: Double = 1.0, configure: Body.() -> Unit): Body(source)

Creates a physical body from a list of points, with nodes initialized based on the specified radius, and applies a configuration to the resulting body.

Return

a Body composed of nodes created from the provided points.

Parameters

points

a list of Vector2 points representing the positions of the nodes in the body.

radius

the radius to be assigned to each node in the body. Defaults to 1.0.

configure

a lambda function to configure the properties of the Body instance.