Improve crushing logic #6
Labels
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sadpmpk/HATPC#6
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
First, need to check all colliding object/tile
For each colliding entity/tile, dot product relative velocity with negative overlap vector (typical overlap vector move the object away from the current object. Negative is not valid, thus is zero'd.
Record the highest magnitude in all four direction. Crushing is valid if there is a value both direction of a single axis (Left and Right, or Up and Down), and the average magnitude exceeds some pre-determined value.
lol, be more simple:
edge check up and down + left and right.
If either pair has collision on both direction, crush.
Resolved with commit
9e60d0fb89