Types/CollisionMask: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(added link to defaults, fixed info)
(Removed old prototype docs)
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The collision mask is specified by list of [[Types/string]], every input is specification of one layer the object collides with.
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/types/CollisionMask.html https://lua-api.factorio.com/latest/types/CollisionMask.html]


Layers are:
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
* ground-tile
* water-tile
* resource-layer
* doodad-layer
* floor-layer
* item-layer
* ghost-layer
* object-layer
* player-layer
* train-layer
* layer-11
* layer-12
* layer-13
* layer-14
* layer-15
 
Layer-11 through layer-15 are currently unused by the core game. Additional input is "not-colliding-with-itself", "consider-tile-transitions" or "colliding-with-tiles-only". These three things are not collision masks, instead they control other aspects of collision, but they are still specified here.
 
The default collision masks of all entity types can be found [[Prototype/Entity#collision_mask|here]].
 
Example (Most common collision mask of buildings):
<syntaxhighlight lang="lua">collision_mask = { "item-layer", "object-layer", "player-layer", "water-tile"}</syntaxhighlight>

Latest revision as of 14:32, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/types/CollisionMask.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.