# SetSpriteCategoryBits

## Description

Assigns the sprite to zero or more categories for collision filtering (physics and non physics). There are 16 categories, each represented by a single bit in the "categories" parameter, a value of 1 for a bit represents that this sprite is a part of that category and 0 that it does not belong to that category. Sprites can then be set to collide with certain categories using SetSpritePhysicsCollideBits regardless of which categories they themselves belong to.
By default all sprites belong to category 1 (0x0001 the rightmost bit) and collide with all categories (0xffff).

## Definition

SetSpriteCategoryBits( iSpriteIndex, categories )

void agk::SetSpriteCategoryBits( UINT iSpriteIndex, UINT categories )

## Parameters

- iSpriteIndex - The ID of the sprite to modify.
- categories - The bitwise field of categories to assign to this sprite.