-
Notifications
You must be signed in to change notification settings - Fork 28
Ir 8616 revive bounding box #2018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
0eb50fd
to
02ccab7
Compare
packages/spatial/src/transform/components/BoundingBoxComponent.ts
Outdated
Show resolved
Hide resolved
I pushed new changes that introduced a new worldBox variable to the BoundingBoxComponent. Some uses require local or world space bounding boxes so I made .box local and added worldBox to be the world space box. |
d8bfd57
to
0b7ec76
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably split these into AABBComponent and OABBComponent for axis aligned and object aligned respectively, though i'm willing to keep it as is. it can become a performance concern in larger scenes, especially if updated dynamically.
what use case do we have currently for OABBs? my expectation previously was AABB |
…proach - Merge Dan's PR #2018 (ir-8616-bounding-box) with worldBox/box distinction - Remove auto-BoundingBoxComponent creation from MeshComponent (use GLTF approach) - Implement getEntityBoundingBox fallback: BoundingBoxComponent.worldBox OR MeshComponent.geometry.boundingBox - Update alignObjects to use worldBox for world-space calculations - Follow HexaField's guidance: no auto-creation, proper fallback, AABB handling Addresses HexaField's review comments and integrates with Dan's proper bounding box infrastructure.
Summary
This change adds a BoundingBoxComponent to any GLTFComponent and fixes the BoundingBox calculation.
Subtasks Checklist
Breaking Changes
References
closes #insert number here
QA Steps
Before Fix:
https://github.com/user-attachments/assets/eb0cd4da-ce7f-40cc-90f2-1019bef407d3
After Fix:
https://github.com/user-attachments/assets/ab697f55-c2de-409d-8455-f17ede082ae8