Skip to content

Conversation

@trasfract
Copy link

@trasfract trasfract commented Feb 18, 2022

includes creation of group parameter
shouldStackEnforceOrder

Issue Number

In some cases, it is important to enforce the order of items in the same group because they are not of the same type.
In the images below, I have added a few items which are meant to be stacked, but the first two red items are related to the first blue item, the next two red items to the next blue item, and the last red item to the last blue item.

With the current code, what we get does not enforce this order (and there is no way to enforce it)
image

This PR makes sure that an item cannot be above an item which is in horizontal collision.
The resulting screenshot is the following:
image

Overview of PR

This PR creates a new group parameter "shouldStackEnforceOrder".
Clearly, this parameter depends upon isStacked. If isStacked is undefined or false, this new parameter has no effect.
If shouldStackEnforceOrder is defined and true for a group, it uses a slightly modified collision method which ensures order is enforced, as shown on the screenshots above.

includes creation of group parameter
shouldStackEnforceOrder
@trasfract trasfract force-pushed the enh/add_order_enforcement_in_stack_process branch from e0fb59b to 98a869d Compare February 18, 2022 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant