love.physics.newCircleBody

Available since LÖVE 12.0
This function is not supported in earlier versions.

Creates a new Body with an attached CircleShape.

This is a convenience constructor which effectively calls love.physics.newBody and love.physics.newCircleShape.

Function

Synopsis

body = love.physics.newCircleBody( type, x, y, radius )

Arguments

BodyType type
The type of the body.
number x
The x position of the body in the world.
number y
The y position of the body in the world.
number radius
The radius of the circle.

Returns

Body body
The new Body with an attached CircleShape. The shape's local origin is at the center of the Body.

See Also


Other Languages