Phaser API Documentation

  Version: 
setCollisionCategory(category)

Description:

Sets the Collision Category that this Arcade Physics Body will use in order to determine what it can collide with.

It can only have one single category assigned to it.

If you wish to reset the collision category and mask, call the resetCollisionCategory method.

Parameters:

name type description
category number

The collision category.

Returns:
Description:

This Game Object.

Since: 3.70.0