Difference between revisions of "World:setContactFilter"

m
(Copy 'n' paste mistakes. Oops.)
 
Line 6: Line 6:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
Body:setContactFilter( filter )
+
World:setContactFilter( filter )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
Line 13: Line 13:
 
Nothing.
 
Nothing.
 
== See Also ==
 
== See Also ==
* [[parent::Body]]
+
* [[parent::World]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Sets a function for collision filtering.}}
 
{{#set:Description=Sets a function for collision filtering.}}
 
{{#set:Since=080}}
 
{{#set:Since=080}}
 
== Other Languages ==
 
== Other Languages ==
{{i18n|Body:setContactFilter}}
+
{{i18n|World:setContactFilter}}

Latest revision as of 19:05, 16 May 2012

Available since LÖVE 0.8.0
This method is not supported in earlier versions.

Sets a function for collision filtering.

If the group and category filtering doesn't generate a collision decision, this function gets called with the two fixtures as arguments. The function should return a boolean value where true means the fixtures will collide and false means they will pass through each other.

Function

Synopsis

World:setContactFilter( filter )

Arguments

function filter
The function handling the contact filtering.

Returns

Nothing.

See Also


Other Languages