Difference between revisions of "Fixture:setMask"
m (Added missing "..." in arguments, added Fixture:set/getMask in see also) |
|||
Line 1: | Line 1: | ||
{{newin|[[0.8.0]]|080|type=method}} | {{newin|[[0.8.0]]|080|type=method}} | ||
− | {{notice|Fixture:setMask works in '''NOT''' | + | {{notice|Fixture:setMask works in '''NOT''' Categories selected will '''NOT''' collide with this fixture. If you want to work as Box2d works with Mask use instead [[Fixture:setFilterData]]}} |
− | Sets the category | + | Sets the category masks of the fixture. There can be up to 16 categories represented as a number from 1 to 16. |
This fixture will '''NOT''' collide with the fixtures that are in the selected categories if the other fixture also has a category of this fixture selected. | This fixture will '''NOT''' collide with the fixtures that are in the selected categories if the other fixture also has a category of this fixture selected. | ||
+ | |||
+ | Calling this function with no arguments will make the fixture have no masks. | ||
== Function == | == Function == | ||
Line 15: | Line 17: | ||
{{param|number|mask1|The first category.}} | {{param|number|mask1|The first category.}} | ||
{{param|number|mask2|The second category.}} | {{param|number|mask2|The second category.}} | ||
+ | {{param|number|...|Additional categories.}} | ||
=== Returns === | === Returns === | ||
Nothing. | Nothing. | ||
Line 20: | Line 23: | ||
* [[parent::Fixture]] | * [[parent::Fixture]] | ||
* [[Fixture:getMask]] | * [[Fixture:getMask]] | ||
+ | * [[Fixture:setCategory]] | ||
+ | * [[Fixture:getCategory]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
{{#set:Description=Sets which categories this fixture should '''NOT''' collide with.}} | {{#set:Description=Sets which categories this fixture should '''NOT''' collide with.}} |
Revision as of 22:28, 21 February 2021
Available since LÖVE 0.8.0 |
This method is not supported in earlier versions. |
Fixture:setMask works in NOT Categories selected will NOT collide with this fixture. If you want to work as Box2d works with Mask use instead Fixture:setFilterData |
Sets the category masks of the fixture. There can be up to 16 categories represented as a number from 1 to 16.
This fixture will NOT collide with the fixtures that are in the selected categories if the other fixture also has a category of this fixture selected.
Calling this function with no arguments will make the fixture have no masks.
Function
Synopsis
Fixture:setMask( mask1, mask2, ... )
Arguments
number mask1
- The first category.
number mask2
- The second category.
number ...
- Additional categories.
Returns
Nothing.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info