Improve crushing logic #6

Closed
opened 2023-06-13 09:29:34 -04:00 by sadpmpk · 2 comments

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.

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.
sadpmpk added this to the General Improvements project 2023-06-13 09:29:34 -04:00
Poster
Owner

lol, be more simple:

edge check up and down + left and right.
If either pair has collision on both direction, crush.

lol, be more simple: edge check up and down + left and right. If either pair has collision on both direction, crush.
Poster
Owner

Resolved with commit 9e60d0fb89

Resolved with commit 9e60d0fb89
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sadpmpk/HATPC#6
There is no content yet.