You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Physics Library > CircleShape

19.6.1 CircleShape

cs = physics.CircleShape(body, radius, offset)

Parameter

Type

Description

body

in physics.Body

A Body or nil

radius

in number

The radius of the circle

offset

in physics.Vect

The offset of the circle from the Body

cs

out physics.CircleShape

A new CircleShape

Returns a new CircleShape with the given body, radius, and offset vector from the body’s center of gravity in body-local coordinates. Specify nil for the body to use the space’s static body.

Introduced in platform.apiLevel = '2.0'