World:getContacts
EditComputes collision information between two shapes and returns a list of contacts where the shapes intersect. Each contact point consists of a position, a normal vector, and a penetration depth.
contacts = World:getContacts(shapeA, shapeB)
Arguments
Name | Type | Description |
shapeA | Shape | The first shape. |
shapeB | Shape | The second shape. |
Returns
Name | Type | Description |
contacts | table |
A list of contacts. Each contact consists of 7 numbers: the contact position, the normal vector, and a depth value indicating how far the shapes intersect each other at the contact point ({ x, y, z, nx, ny, nz, depth } ).
|
Notes
This only detects collision information, it does not cause the shapes to collide with each other. Use World:collide
for that.
This function ignores collision tags.