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

19.5.17 setSensor

elf = physics.Shape:setSensor(bool)

Parameter

Type

Description

self

in physics.Shape

The input Shape

bool

in boolean

True if the shape is a sensor

self

out physics.Shape

The input Shape is returned as the output

Determines if the shape is a sensor (true) or not (false). Sensors call collision handlers but do not generate collisions. Returns self.

Introduced in platform.apiLevel = '2.0'