crystal.physics.define_categories

Sets the list of categories that can describe colliders and sensors. You should call this function once, from "main.lua".

LOVE supports up to 16 categories. Crystal reserves one of them (named "level"), which leaves up to 15 for you to define.

Usage

crystal.physics.define_categories(categories)

Arguments

Name Type Description
categories table List of category names as strings.

Examples

-- In main.lua
require("crystal");

crystal.physics.define_categories({ "character", "monster", "powerup" });

This site uses Just the Docs, a documentation theme for Jekyll.