Difference between revisions of "Shape:setFilterData"

m (1 revision: Imported docs from potato.)
Line 1: Line 1:
  
 +
Sets the filter data for a Shape.
 +
Info stolen from box2d.org:
  
 +
''Collision filtering is a system for preventing collision between shapes. For example, say you make a character that rides a bicycle. You want the bicycle to collide with the terrain and the character to collide with the terrain, but you don't want the character to collide with the bicycle (because they must overlap). Box2D supports such collision filtering using categories and groups.''
 +
 +
Read more about this in the [http://box2d.org/manual.html#d0e845 Box2D documentation].
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
Line 15: Line 20:
 
* [[parent::Shape]]
 
* [[parent::Shape]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=}}
+
{{#set:Description=Sets the filter data for a Shape.
 +
}}

Revision as of 16:17, 14 February 2010

Sets the filter data for a Shape. Info stolen from box2d.org:

Collision filtering is a system for preventing collision between shapes. For example, say you make a character that rides a bicycle. You want the bicycle to collide with the terrain and the character to collide with the terrain, but you don't want the character to collide with the bicycle (because they must overlap). Box2D supports such collision filtering using categories and groups.

Read more about this in the Box2D documentation.

Function

Synopsis

Shape:setFilterData( categoryBits, maskBits, groupIndex )

Arguments

number categoryBits
A 16-bit integer representing category membership.
number maskBits
A 16-bit integer representing masked categories.
number groupIndex
An integer representing the group index.

Returns

Nothing.

See Also