# SetSpritePhysicsIsSensor

## Description

Set this to 1 to make the sprite a sensor object. Physics sensors detect collisions and contacts but do not respond to them, they also do not affect anything that hits them. Their only purpose is to detect collisions. If you apply this to a dynamic body it will not collide with anything and most likely fall through the floor and continue falling forever, it is still affected by forces.
By default this sets all shapes to the same value, you can set this value on a per shape basis by specifying a shapeID value greater than 0. Shape IDs start at 1 for the first shape, with shapeID 0 meaning apply it to all shapes.

## Definition

SetSpritePhysicsIsSensor( iSpriteIndex, sensor )

void agk::SetSpritePhysicsIsSensor( UINT iSpriteIndex, int sensor )

SetSpritePhysicsIsSensor( iSpriteIndex, sensor, shapeID )

void agk::SetSpritePhysicsIsSensor( UINT iSpriteIndex, int sensor, int shapeID )

## Parameters

- iSpriteIndex - The ID of the sprite to modify.
- sensor - 1 to set this sprite as a sensor, 0 to make it a normal physics object.
- shapeID - the ID of the shape to change, 0 to set all the sprite's shapes to this value