Commit Graph

4 Commits (e8ebe0f89c87c67b8ea34baff861623b4b70e0f6)

Author SHA1 Message Date
En Yi e8ebe0f89c Improve player collision to chests vs crates
Internal Changelog:
- Delay zeroing velocity on edge check to after hitbox update
- Update player velocity on hitting a crate explicitly
    - This is due to the zeroing velocity changes above
    - This essentially allow 'phasing' through chest but not wooden
      crates
- Render crates using material instead of fragile flag
2023-09-23 00:28:03 +08:00
En Yi cd8ec0c7ed Fix grid entities set update bug for OOB entities
When entities are marked for deletion, the tilecoord components
still exists, which can update the grid entities set, even if the
entity is not alive
2023-08-15 19:58:14 +08:00
En Yi 494c9e9e46 Fix incorrect line test
By this project convention, the line extend will start from p1 and
end at p2, but not including p2 [p1, p2). Thus, existing tests are
testing a zero-length line, which should assert no collision.

Add test to properly test AABB edge collision with a line

Also update existing collision function to account for this
2023-08-13 12:34:27 +08:00
En Yi aae61edda9 Refactor out broad phase grid collision functions 2023-07-17 21:14:02 +08:00