World:newSphereCollider

Adds a new Collider to the World with a SphereShape already attached.

collider = World:newSphereCollider(x, y, z, radius)

Arguments

NameTypeDefaultDescription
xnumber0The x coordinate of the center of the sphere.
ynumber0The y coordinate of the center of the sphere.
znumber0The z coordinate of the center of the sphere.
radiusnumber1The radius of the sphere, in meters.

Returns

NameTypeDescription
colliderColliderThe new Collider.

See also