# SetSpriteGroup

## Description

Assigns this sprite to a group for filtering collisions (physics or non physics). In physics, sprites of the same positive group ID will always collide, whilst those that share the same negative group ID will never collide. Those with a group ID of zero (default), or differing group IDs move on to the category filter check.

## Definition

SetSpriteGroup( iSpriteIndex, group )

void agk::SetSpriteGroup( UINT iSpriteIndex, int group )

## Parameters

- iSpriteIndex - The ID of the sprite to modify.
- group - The group ID to assign to this sprite.