self:get_colliding_bodies
Client
Retrieves a list of rigid bodies of the same type currently colliding with this rigid body
Syntax
local bodies = self:get_colliding_bodies()Parameters
| No parameters are accepted by this function |
|---|
Returns
| Type | Name | Description |
|---|---|---|
table | bodies | Array of colliding rigid body instances |
Examples
local entity = physics.rigid.create()
for i, body in ipairs(entity:get_colliding_bodies()) do
core.engine.print("info", "Rigid body colliding bodies:", body)
end