19.13.3
segmentQuery
physics.Space:segmentQuery(startvect, stopvect, layers, group,
Parameter |
Type |
Description |
---|---|---|
self |
in physics.Shape |
The input Shape |
startvect |
in physics.Vect |
An end point of the segment |
stopvect |
in physics.Vect |
Other end point of the segment |
layers |
in number |
A bitmap of the layers. |
group |
in number |
The group number to check. |
function |
function(shape, t, normal) |
A function to call providing each Shape in turn that matches the criteria |
Queries the Space for all Shapes that intersect the line segment from startvect to stopvect and match layers and not in group. The function is called with each matching Shape. Sensor Shapes are included.
The callback function is called with each Shape, proportion of distance along the line segment (a fraction from 0 to 1), and the surface normal vector of the intersection point of the Shape.
Introduced in platform.apiLevel = '2.0'