Types/CollisionMask: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
No edit summary
(added link to defaults, fixed info)
Line 18: Line 18:
* layer-15
* layer-15


Additional input is "not-colliding-with-itself". Layer-11 through layer-15 are currently unused by the core game.
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):
Example (Most common collision mask of buildings):
    collision_mask = { "item-layer", "object-layer", "player-layer", "water-tile"}
<syntaxhighlight lang="lua">collision_mask = { "item-layer", "object-layer", "player-layer", "water-tile"}</syntaxhighlight>

Revision as of 11:48, 17 November 2018

The collision mask is specified by list of Types/string, every input is specification of one layer the object collides with.

Layers are:

  • 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 here.

Example (Most common collision mask of buildings):

collision_mask = { "item-layer", "object-layer", "player-layer", "water-tile"}