R3d.Fixture:setCollisionCategoryBits: Difference between revisions
From GiderosMobile
m Text replacement - "<source" to "<syntaxhighlight" |
m Text replacement - "</source>" to "</syntaxhighlight>" |
||
| Line 6: | Line 6: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
r3d.Fixture:setCollisionCategoryBits(bits) | r3d.Fixture:setCollisionCategoryBits(bits) | ||
</ | </syntaxhighlight> | ||
=== Parameters === | === Parameters === | ||
| Line 15: | Line 15: | ||
local fixture = ship.body:createFixture(shape, nil, mass) -- shape, transform, mass | local fixture = ship.body:createFixture(shape, nil, mass) -- shape, transform, mass | ||
fixture:setCollisionCategoryBits(8) | fixture:setCollisionCategoryBits(8) | ||
</ | </syntaxhighlight> | ||
{{R3d.Fixture}} | {{R3d.Fixture}} | ||
Revision as of 13:32, 13 July 2023
Available since: Gideros 2019.10
Class: R3d.Fixture
Description
Sets the fixture category bit.
r3d.Fixture:setCollisionCategoryBits(bits)
Parameters
bits: (number) the fixture category bit (power of 2)
Example
local fixture = ship.body:createFixture(shape, nil, mass) -- shape, transform, mass
fixture:setCollisionCategoryBits(8)