Page 1 of 1

Help with collision_mask

Posted: Sat Nov 28, 2020 12:43 pm
by Jaren Taq
Hello,

I have two prototype classes, basically markers for the floor, which might share the same position but should collide with other entities:

Code: Select all

-- same "class"
-- should collide with objects, itself, proto_b, but not with proto_c, proto_d
proto_a.collision_mask = {"object-layer", "transport-belt-layer", "floor-layer", "water-tile"}
-- should collide with objects, itself, proto_a, but not with proto_c, proto_d
proto_b.collision_mask = {"object-layer", "transport-belt-layer", "floor-layer", "water-tile"}
-- different "class"
-- should collide with objects, itself, proto_d, but not with proto_a and proto_b
proto_c.collision_mask = {"object-layer", "transport-belt-layer", "floor-layer", "water-tile"}
-- should collide with objects, itself, proto_c, but not with proto_a and proto_b
proto_d.collision_mask = {"object-layer", "transport-belt-layer", "floor-layer", "water-tile"}
Is there a possibility to do something like this without wasting using 8 additional collision layers?

Thanks, Jaren

Re: Help with collision_mask

Posted: Sat Nov 28, 2020 12:50 pm
by darkfrei
Just add two extra collision layers.