Type Function Return value Table Revision Release 2022.3683 Keywords physics, collision, filter, viewAllFilters See also collisionFilters.setupFilters() collisionFilters.getFilter()
This function returns a table of all filters created via collisionFilters.setupFilters() in
Data contained in the returned table is not valid for usage in the physics.addBody() function — its purpose is primarily for examining all filter relationships.
collisionFilters.viewAllFilters()
local collisionFilters = require( "plugin.collisionFilters" ) collisionFilters.setupFilters( { player = { "enemies", "powerUps" }, enemies = "playerBullets", }) -- Find out which filters were created local allReadableFilters = collisionFilters.viewAllFilters() for k,v in pairs( allReadableFilters ) do print( "Filter/category '" .. k .. "' is set to collide with: " .. table.concat( v, ", " ) ) end