Skip to content

Fix/mismatch calculating elements bounding boxes#250

Merged
marco-ponds merged 4 commits into
masterfrom
fix/mismatch-calculating-elements-bounding-boxes
May 12, 2026
Merged

Fix/mismatch calculating elements bounding boxes#250
marco-ponds merged 4 commits into
masterfrom
fix/mismatch-calculating-elements-bounding-boxes

Conversation

@marco-ponds
Copy link
Copy Markdown
Collaborator

No description provided.

marco-ponds and others added 4 commits May 12, 2026 12:32
The previous fix (977bc6b) aligned box collider computed sizes with the
physics worker, but sphere and player colliders still used geometry-local
bounding volumes that ignore internal mesh transforms.

- extractSphereDescription: derive radius from Box3.setFromObject()
- getPlayerDescriptionForElement: use extractWorldBoxDescription
- getSphereHitbox: use world-space AABB for auto-radius
- getComputedColliderSize: derive radius from world-space AABB

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
getWorldBoundingBoxSize and getWorldBoundingSphereRadius in utils.js
replace duplicated Box3.setFromObject / degenerate-check / max-axis
logic that was copy-pasted across utils.js, hitbox.js, and Element.js.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@marco-ponds marco-ponds merged commit bdf904d into master May 12, 2026
1 check passed
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