Page 1 of 1

Multiple collision boxes for each collision mask

Posted: Sun May 14, 2017 7:31 pm
by LukeM
Ive had a problem for a while where there is no way (that ive found) to add entities that dont snap to the grid, but you can still move between when you place them (apart from making them not collide with the player at all).
With a grid it is fairly simple (you just make the collision box slightly smaller than the grid, so there is a gap), but with entities that dont snap, this is not possible

If there was a way to have a seperate collision box for each mask, then you could have a smaller box for players, and a larger one for objects, so there would be a minimum distance you could have between entities (im sure that there are also other uses for this too)

I was thinking that if the current way collision masks work already supports this, it would probably be a simple change, but would allow for quite a few things you couldn't previously do with mods

A possible way to add entities with multiple collision boxes could be:

Code: Select all

As well as:
collision_box = { { -0.8, -0.8 }, { 0.8, 0.8 } }

Also have another option:
collision_boxes = {
    object-layer = { { -0.8, -0.8 }, { 0.8, 0.8 } },
    player-layer = { { -0.6, -0.6 }, { 0.6, 0.6 } }
}

Re: Multiple collision boxes for each collision mask

Posted: Tue Oct 02, 2018 10:48 pm
by Rseding91
The game only has 1 entity with multiple collision boxes and it already causes a massive amount of problems.

We're never going to add more collision boxes to entities.