Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/matter-adapter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## 1.2.0 - _2026-08-23_
## 1.2.0 - _2026-08-24_

### Fixed
- **A body with more than one shape received NO collision events at all.** matter reports collisions between compound **parts**, but only the parent body was registered against its renderable, so every dispatch failed its lookup and returned early. That silently dropped `onCollision`, `onCollisionStart`, `onCollisionActive` and `onCollisionEnd` for any multi-shape body, while single-shape bodies worked normally. Parts now resolve through `body.parent`, which matter sets to the body itself for a simple body, so both cases take one path
Expand Down
2 changes: 1 addition & 1 deletion packages/melonjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## [20.1.0] (melonJS 2) - _2026-08-23_
## [20.1.0] (melonJS 2) - _2026-08-24_

### Added
- **Shape-level collision events** ([#1596](https://github.com/melonjs/melonJS/issues/1596)): `onShapeCollisionStart`, `onShapeCollisionActive` and `onShapeCollisionEnd` report **every** overlapping shape pair between two bodies, where `onCollision` and the `onCollision*` lifecycle report only the single contact chosen for physical resolution. A body colliding through several shapes at once could previously surface just one of them, and a solid contact masked a simultaneous trigger contact entirely. Each contact carries both shapes, both indices into `body.shapes`, the trigger status and the SAT data, receiver-symmetric so `shapeA` / `indexShapeA` are always your own. **Physical resolution is untouched**: the same pair is chosen for push-out, with the same solid-over-trigger preference from #1590. **Opt-in**: the detector enumerates shape pairs only when an object declares one of these handlers, so an application that declares none performs exactly the narrowphase work it did before, which is asserted directly rather than assumed. Contact identity is a stable id stamped on the shape, not its array position, because `removeShape()` re-indexes every surviving shape and a position-based identity would end and restart unrelated contacts. Supported by all three physics backends: the builtin detector, `@melonjs/planck-adapter` (Box2D reports one contact per fixture pair, and the adapter builds one fixture per shape) and `@melonjs/matter-adapter` (one matter part per shape, and matter's pairs are already per-part), so on both adapters the enumeration is what the engine reports natively rather than something layered on top
Expand Down
2 changes: 1 addition & 1 deletion packages/planck-adapter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## 1.3.0 - _2026-08-23_
## 1.3.0 - _2026-08-24_

### Added
- **Shape-level collision events** ([melonjs#1596](https://github.com/melonjs/melonJS/issues/1596)): `onShapeCollisionStart`, `onShapeCollisionActive` and `onShapeCollisionEnd` now fire on this backend, reporting every overlapping shape pair rather than one contact per body pair. Box2D creates one contact per FIXTURE pair and this adapter already builds one fixture per shape, so the enumeration is what the engine reports natively rather than something layered on top: a compound body overlapping through several shapes produces several contacts, and each names its own pair. Each contact carries both shapes, both indices into the body definition, the trigger status and the contact normal and depth, receiver-symmetric so `shapeA` / `indexShapeA` are always your own
Expand Down
Loading