Page 1 of 1

[0.17.30] "not-colliding-with-itself" acts as global non colliding whitelist

Posted: Sat Apr 13, 2019 10:40 pm
by Muppet9010
In 0.17.30 the collision mask option "not-colliding-with-itself" has the behaviour of acting as a global whitelist of prototypes that don't collide with any other prototype with the flag. However the name implies that the prototype should only not collide with itself when it has this flag. Tested same behaviour in 16.51.
This has been questioned so raising for an official ruling :)

To test
  1. Modify the file: data\base\prototypes\entity\demo-entities.lua
  2. Set the collision mask for both the player.player and assembling-machine.assembling-machine-1 to:

    Code: Select all

    collision_mask = {"object-layer", "player-layer", "train-layer", "consider-tile-transitions", "not-colliding-with-itself"},
  3. Load a new game and via editor place an Assembly Machine 1 and 2 on the map
  4. return to play mode and your character can run through the Assembly Machine 1, but not the mk2 version.

Re: [0.17.30] "not-colliding-with-itself" acts as global non colliding whitelist

Posted: Sun Apr 14, 2019 10:15 am
by ownlyme
i'm pretty sure it's for buildings that consist of multiple sub-entities.
Like this you can simply give your entities (that all are placed in the same collision box) that flag and you won't have issues with blueprint ghosts etc.
Giving this flag to a moving entity was surely not intended
of course only the sub-entities would get this flag (and only this flag), and the main object (that you build) doesn't get it, so you can't build two of these buildings on top of each other

for me, this is 100% how i'd expect this flag to behave.. or actually even better because i thought it was just a normal collision mask that only works for *one* sub-entity, and not for multiple

Re: [0.17.30] "not-colliding-with-itself" acts as global non colliding whitelist

Posted: Sun Apr 14, 2019 10:21 am
by Klonan
Set the collision mask for both the player.player and assembling-machine.assembling-machine-1 to:
If both entities have the same collision mask, then its working as intended.

Re: [0.17.30] "not-colliding-with-itself" acts as global non colliding whitelist

Posted: Sun Apr 14, 2019 12:38 pm
by Muppet9010
thanks Klonan, you have clarified a point I had missed around the need of the entire collision mask list needing to be identical and not just having the same layer for the collision to not occur if both entities have this option flag.