Rigid Body

self:get_contact_count

Shared

Retrieves the number of contacts currently recorded on the rigid body

Syntax

local count = self:get_contact_count()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
intcountCurrent contact count

Examples

Get contact count on a rigid body
local entity = physics.rigid.create()

core.engine.print("info", "Rigid body contact count:", entity:get_contact_count())

On this page