You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Physics Library > pointQueryFirst

19.13.2 pointQueryFirst

shape = physics.Space:pointQueryFirst(point, layers, group)

Parameter

Type

Description

self

in physics.Space

The input Space

point

in physics.Vect

A point

layers

in number

A bitmap of the layers.
Match if shape.layers intersects layers

group

in number

The group number to check.
Match if Shape is not in group

Queries Space at a point and returns the first Shape that matches the given layers and not in group. Returns nil if no Shape was found. Sensor Shapes are ignored.

Introduced in platform.apiLevel = '2.0'