Difference between revisions of "B2.Fixture:setFilterData"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> Sets the contact filtering data. This will not update contacts until the next time step<br /> w...") |
|||
Line 14: | Line 14: | ||
<br /> | <br /> | ||
<source lang="lua"> | <source lang="lua"> | ||
− | + | b2.Fixture:setFilterData(filterData) | |
</source> | </source> | ||
− | '''filterData | + | '''filterData''': (table) ''''''<br/> |
Revision as of 10:16, 23 August 2018
Available since: Gideros 2011.6
Description
Sets the contact filtering data. This will not update contacts until the next time step
when either parent body is active and awake. The filter data definition is given
as a ordinary table. The fields of the filter data table are:
- `categoryBits`: (number) The collision category bits. Normally you would just set one bit.
- `maskBits`: (number) The collision mask bits. This states the categories that this shape would accept for collision.
- `groupIndex`: (number) Collision groups allow a certain group of objects to never collide (negative) or always collide (positive). Zero means no collision group. Non-zero group filtering always wins against the mask bits.
b2.Fixture:setFilterData(filterData)
'filterData: (table) '