spatial_query returns oriented bounding boxes as if they were world-axis-aligned
Back to board## ▼ FIELD 1 — Steps to reproduce
**Environment**
| | |
|---|---|
| Plugin version | 2.12.1 **and** 2.12.2 — identical results |
| MCP server | 2.12.2 |
| Places | two: a large production place, and an **empty unpublished baseplate** (`placeId 0`) — identical results |
| AI client | Claude Code 2.1.226 |
| Model | Claude Opus 5 |
| OS | Windows 11 Pro (10.0.26200) |
| Studio | 0.733.0.7330989 |
| Tier | PRO |
**Steps**
Cases A–D use a plain `Part`; E adds a pitch instead of a yaw, F uses a `MeshPart`, and G uses a
Model whose two children are rotated against each other.
1. In Edit mode, create anchored parts that all share `Size = (13.3, 9, 21.7)` and differ only in
yaw:
```lua
-- A: yaw 0 B: yaw 45 C: yaw 90 D: same as C, wrapped in a Model
p.Size = Vector3.new(13.3, 9, 21.7)
p.CFrame = CFrame.new(x, 10, 5000) * CFrame.Angles(0, math.rad(deg), 0)
```
2. Independently compute the true world AABB as a reference by transforming the 8 corners — this
does **not** use any Weppy call:
```lua
local function weltAABB(cf, size)
local h, minV, maxV = size / 2, nil, nil
for _, sx in ipairs({-1, 1}) do for _, sy in ipairs({-1, 1}) do for _, sz in ipairs({-1, 1}) do
local p = cf:PointToWorldSpace(Vector3.new(h.X * sx, h.Y * sy, h.Z * sz))
minV = minV and Vector3.new(math.min(minV.X,p.X), math.min(minV.Y,p.Y), math.min(minV.Z,p.Z)) or p
maxV = maxV and Vector3.new(math.max(maxV.X,p.X), math.max(maxV.Y,p.Y), math.max(maxV.Z,p.Z)) or p
end end end
return maxV - minV
end
```
3. Call `spatial_query { action: "bounds", path: "<part>" }` for each part.
4. Call `spatial_query { action: "spatial_map", rootPath: "<folder>" }`.
5. For the collision case, place `C` at yaw 90 centred at x = 5300, add a small obstacle at
x = 5318, and call
`spatial_query { action: "collision", path: "<C>", position: { x: 5309, y: 10, z: 5000 } }`.
Reproduces 100 % of the time. One rotated part is enough; the extra cases exist only to isolate
the variable.
---
## ▼ FIELD 2 — Expected behavior
`bounds`, the `boundingBox` entries in `spatial_map`, and the `testBox` used by `collision` all
describe a **world-axis-aligned** box, i.e. the space the instance actually occupies. For `collision`
that means a part which would overlap an obstacle at the tested position is reported as colliding.
**Why we treat axis-alignment as the contract rather than as our own assumption** — two reasons
that do not depend on interpretation:
1. **Your schema says so.** The `action` enum documents `collision` as an "**AABB** collision
check". AABB is the axis-aligned bounding box; the oriented one is an OBB, a different object
with a different name. What is returned is the OBB.
2. **The response format cannot express anything else.** `bounds` returns `min` and `max` as world
coordinates. A world-space `min`/`max` pair can only describe an axis-aligned box — there is no
field in which an orientation could be carried. So the moment an oriented box is emitted through
that shape, it is misdescribed regardless of what was intended.
And independently of both: `collision` reporting `hasCollision: false` for a part that visibly
intersects the obstacle (3c), and `find_space` offering space inside a solid part (3d), are wrong
under any reading of the intent.
---
## ▼ FIELD 3 — Actual behavior
All three report the object's **own** box as if it were world-aligned: for a `BasePart` that is
`center ± Size/2`, for a `Model` it is `Model:GetBoundingBox()` (confirmed in FIELD 5). Either way
the instance is treated as if it were unrotated.
**3a — `bounds`**
| case | true world AABB (reference) | `bounds` → `size` | correct? |
|---|---|---|---|
| A — Part, yaw 0 | 13.30 / 9.00 / 21.70 | 13.30 / 9.00 / 21.70 | ✅ |
| B — Part, yaw 45 | **24.75** / 9.00 / **24.75** | 13.30 / 9.00 / 21.70 | ❌ |
| C — Part, yaw 90 | **21.70** / 9.00 / **13.30** | 13.30 / 9.00 / 21.70 | ❌ |
| D — Part, yaw 90, inside a Model | **21.70** / 9.00 / **13.30** | 13.30 / 9.00 / 21.70 | ❌ |
| E — Part, **pitch 90** (rotated about X) | 13.30 / **21.70** / **9.00** | 13.30 / 9.00 / 21.70 | ❌ |
| F — **MeshPart**, Size 6/4/14, yaw 90 | **14.00** / 4.00 / **6.00** | 6.00 / 4.00 / 14.00 | ❌ |
| G — Model, **two parts rotated against each other** | 10.00 / 4.00 / 10.00 | 10.00 / 4.00 / 10.00 | ✅ |
| H — Model, one rotated part, **PrimaryPart set** | **20.00** / 4.00 / **8.00** | 8.00 / 4.00 / 20.00 | ❌ |
| I — **UnionOperation**, yaw 90 | **0.20** / 0.50 / **1.00** | 1.00 / 0.50 / 0.20 | ❌ |
| K — Part, **roll 90** (about Z) | **4.00** / **8.00** / 20.00 | 8.00 / 4.00 / 20.00 | ❌ |
| L — Part, **combined** yaw 30 + pitch 20 | **16.93** / **11.05** / **21.40** | 8.00 / 4.00 / 20.00 | ❌ |
| M — Model, rotated child, **`ScaleTo(2)`** | **40.00** / 8.00 / **16.00** | 16.00 / 8.00 / 40.00 | ❌ |
| N — **WedgePart**, yaw 90 | **20.00** / 4.00 / **8.00** | 8.00 / 4.00 / 20.00 | ❌ |
| O — **TrussPart**, yaw 90 | **16.00** / 2.00 / **2.00** | 2.00 / 2.00 / 16.00 | ❌ |
Note on case M: the **scale is applied correctly** (the reported size is 16/8/40, i.e. 2× the
child's 8/4/20) — only the rotation is dropped. So this is specifically a rotation defect, not a
general transform problem.
`min`/`max` are wrong in the same way: for case C the response spans X 5293.35 … 5306.65 (13.30)
while the part really spans 5289.15 … 5310.85 (21.70).
Four things worth singling out:
- **Case E — the error is not limited to the footprint.** A part tilted about X reports the wrong
**height**. Anything doing ceiling clearance or "does it stick through the floor above" checks is
affected just as much as footprint checks.
- **Case G — resolved, see FIELD 5.** A Model whose children are rotated *against each other*
returned a correct box, while a Model with a single rotated child (case D) did not. We first
filed this as an open question because our two-part layout was rotationally symmetric at 90°,
so an oriented box and a world AABB were indistinguishable for it. We have since built an
asymmetric version, and it resolves the whole report into a single mechanism.
- **Case H — setting `PrimaryPart` changes nothing.** We tested it specifically because our
hypothesis involves the model pivot: a Model with one rotated child and an explicitly set
`PrimaryPart` is still wrong (20/4/8 expected, 8/4/20 reported). So the defect is not a matter of
an unset pivot.
- **Case I — `UnionOperation` is affected too**, same as `Part` and `MeshPart`.
**3b — `spatial_map`** returns the rotation *and* a box that ignores it — in the same object:
```json
{
"name": "C_yaw90",
"rotation": { "x": 0, "y": 90.00000250447816, "z": 0 },
"size": { "x": 13.300000190734863, "y": 9, "z": 21.700000762939453 },
"boundingBox": {
"min": { "x": 5293.349999904633, "y": 5.5, "z": 4989.14999961853 },
"max": { "x": 5306.650000095367, "y": 14.5, "z": 5010.85000038147 }
}
}
```
The aggregate `bounds` of that same call is short for the same reason (`max.x` 5306.65 instead of
5310.85). **The rotation is available at the point where the box is computed — it is simply not
applied.**
**3c — `collision` produces a false negative (the most damaging case)**
Setup: `C_yaw90` (Size 13.3/9/21.7, yaw 90), tested at position x = 5309. An obstacle part occupies
x 5317 … 5319.
| | X extent | overlaps the obstacle? |
|---|---|---|
| true box of C at x = 5309 | 5298.15 … **5319.85** | **yes** |
| `testBox` returned by `collision` | 5302.35 … 5315.65 | no |
Actual response:
```json
{
"testedPosition": { "x": 5309, "y": 10, "z": 5000 },
"hasCollision": false,
"collisionCount": 0,
"collisions": [],
"testBox": {
"min": { "x": 5302.349999904633, "y": 5.5, "z": 4989.14999961853 },
"max": { "x": 5315.650000095367, "y": 14.5, "z": 5010.85000038147 }
}
}
```
The part would visibly intersect the obstacle at that position, and the tool reports the position as
free. For a placement workflow this is the worst possible direction of error: it does not block a
bad placement, it *approves* one.
**3d — Scope: all 13 `spatial_query` actions were tested**
The split is clean: **every action that raycasts through the engine is correct; every action that
computes its own AABB is wrong.**
| action | result | evidence |
|---|---|---|
| `bounds` | ❌ wrong | 14 cases in 3a (12 wrong; A and G are the two cases where the oriented box happens to equal the world AABB) |
| `spatial_map` | ❌ wrong | `boundingBox` ignores the `rotation` it reports itself |
| `collision` | ❌ wrong | false negative, see 3c |
| `find_space` | ❌ wrong | see below |
| `check_placement` | ✅ correct | see 3e |
| `scan_area` | ✅ correct | heights 10.5 over the rotated part (`rayCount: 9`) |
| `analyze_walkable` | ✅ correct | same heights (`rayCount: 24`) |
| `find_flat` | ✅ correct | flat areas at y 10.5 on the part's top face (`rayCount: 35`) |
| `find_spawn` | ✅ correct | spawn points at y 10.5 (`rayCount: 24`) |
| `raycast` | ✅ correct | hits the part at y 10.5 |
| `find_ground` | ✅ correct | ground at y 10.5 on the part, not the floor below |
| `multi_raycast` | ✅ correct | x 6018 hits the part, x 6022 hits the floor — the true edge is 6020 |
| `snap_grid` | — n/a | pure position arithmetic, no object extent involved |
**`find_space` reports free space inside a solid part.** Obstacle: `Size = (8, 10, 40)` at yaw 90,
centred at x 6000 / z 6000 — true extent **x 5980 … 6020**, z 5996 … 6004. Searching for a 4×8×4
volume in x 6008 … 6019 / z 5997 … 6003 returned **10 "empty" spaces**, all inside the obstacle,
e.g. centre `(6008, 6, 5999)` with box x 6006 … 6010 / z 5997 … 6001. That region is solid.
For a placement workflow this is the same failure direction as 3c: it does not merely miss space,
it **offers occupied space as free**.
**3e — `check_placement` is NOT affected**
Probing a 1×1×1 volume against the same rotated part:
| probe position | inside true AABB? | inside reported AABB? | result |
|---|---|---|---|
| (5309, 10, 5000) | yes | no | `canPlace: false`, collides with the rotated part ✅ |
| (5313, 10, 5000) | no | no | `canPlace: true` ✅ |
So the engine-side overlap path is correct, and the defect sits in the tool's own box arithmetic.
That should narrow the fix to one place.
**Already ruled out**
- [x] **Unit / pivot / semantics misunderstanding on our side** — the unrotated control case A is
exactly correct; only rotated cases deviate.
- [x] **A 90°-only special case** — yaw 45 is wrong too. At 90° the reported box is merely the true
one with X and Z swapped, which looks plausible far longer; at 45° it is not a permutation of
the truth at all (X reported 1.86× too small, Z 1.14× too small).
- [x] **A yaw-only special case** — a part pitched 90° about X reports the wrong height (case E),
so the defect is not confined to the horizontal plane.
- [x] **A `Part`-only special case** — `MeshPart` (case F) and `UnionOperation` (case I) behave
identically. Class does not matter.
- [x] **An unset model pivot** — a Model with an explicitly set `PrimaryPart` is still wrong
(case H).
- [x] **Inherited purely from `Model:GetBoundingBox`** — a bare `Part` (no Model involved) is
already wrong, so the part path has its own defect, and a `Folder` is wrong in a third way
again (FIELD 6b). For Models the source is confirmed to be `Model:GetBoundingBox()` — see
FIELD 5 and 6a. **Three entry points, three algorithms, one symptom.**
- [x] **Reference contaminated by another Weppy call** — the reference AABB is computed from the 8
transformed corners in `execute_luau`, independent of the tool under test.
- [x] **One-off / flaky** — all 14 cases in 3a were repeated across separate runs and in two
different places. Every result is deterministic; nothing here is intermittent.
- [x] **Whole tool broken** — `check_placement` is correct, so this is not a general spatial
failure.
- [x] **Unclear scope** — all 13 `spatial_query` actions were exercised against the same rotated
obstacle (table in 3d). 4 are wrong, 8 are correct, 1 is not applicable.
- [x] **Rotation axis** — yaw (45°, 90°), pitch (90°), roll (90°) and a combined yaw 30 + pitch 20
all fail. The combined case is the worst: 16.93/11.05/21.40 expected, 8/4/20 reported.
- [x] **Instance class** — `Part`, `MeshPart`, `UnionOperation`, `WedgePart`, `TrussPart` and
`Model` all fail.
- [x] **Scaling as a confound** — a Model scaled with `ScaleTo(2)` reports the scale correctly and
still drops the rotation, so this is a rotation defect specifically.
- [x] **Parameter variations masking it** — `find_space` with `padding: 2` still offers space
inside a rotated part; `collision` with `ignorePaths` still builds the wrong `testBox`;
`spatial_map` with `includeModels: false` is unchanged.
- [x] **Place-specific state** (corrupt data, odd instances, stale sync) — re-run on a **brand-new
empty baseplate** (`placeId 0`, no scripts, no map, nothing but the test parts). All parts
there share `Size = (13.3, 9, 21.7)`, and every rotated case reported exactly that raw `Size`:
yaw 0 correct; yaw 45 → 13.30/9/21.70 instead of 24.75/9/24.75; yaw 90 → 13.30/9/21.70
instead of 21.70/9/13.30; yaw 30 + pitch 20 → 13.30/9/21.70 instead of 22.37/17.16/26.99.
(These reference values differ from cases L/M in 3a because those used a part of
`Size = (8, 4, 20)`.)
- [x] **Fixed in the newer plugin build** — plugin **2.12.2** produces identical output to 2.12.1.
Cross-matrix, all three reachable combinations measured:
| | plugin 2.12.1 | plugin 2.12.2 |
|--------------|---------------|---------------|
| large place | ❌ wrong | ❌ wrong |
| empty place | not reachable¹ | ❌ wrong |
¹ The plugin auto-updates on every Studio start, so downgrading to 2.12.1 to fill that cell
is not possible. Stating it rather than implying coverage.
- [x] **Model behaviour is stable across versions** — repeated under 2.12.2 in the large place:
case D (Model, one rotated child) wrong → 13.30/9/21.70 instead of 21.70/9/13.30; case H
(`PrimaryPart` set) wrong, same numbers; case G (two children rotated against each other)
correct → 10/4/10. So the one correct Model case is reproducible and not a fluke; FIELD 5
explains why it is correct.
**Not tested** (stating this rather than implying coverage):
- `Terrain`, which has no instance rotation and so cannot exhibit this defect.
- Edit mode only. `spatial_query` was not called during a playtest.
- Only one Studio build (0.733.0.7330989).
**Mechanism (measured) and hypothesis (marked as such)**
**Measured — one symptom, three entry points with three different algorithms.** None of them
computes a world AABB, and all three are returned through the same world-space `min`/`max`/`size`:
1. **For BaseParts** the returned `size` is the raw `Size` property, byte for byte, in every
rotated case we measured (see FIELD 4) — the oriented box in the part's own frame.
2. **For Models** the returned box matches `Model:GetBoundingBox()` to the last reported decimal,
on two asymmetric models (FIELD 5) and on a model whose *only* rotation is its pivot (FIELD 6a).
That is the oriented box in the pivot frame.
3. **For containers** (`Folder`) it is a **naive union of each child's `center ± Size/2`** —
matched exactly, and matching neither the true AABB nor any oriented box (FIELD 6b).
That accounts for every row of the 3a table, including the two that look correct (a part or pivot
at yaw 0, where the oriented box *is* the world AABB), for `ScaleTo(2)` being respected (it scales
the oriented box), and for `PrimaryPart` making no difference (only the pivot orientation matters,
not which part supplies it).
**Hypothesis, not measured — where it sits in your code.** We cannot see the implementation, so
this part is a guess: a single AABB helper shared by `bounds`, `spatial_map`, `collision` and
`find_space`, which `check_placement` does not use (it appears to go through an engine overlap
query, and it is correct). The strongest hint is the `spatial_map` response in 3b: it carries the
correct `rotation` right next to the rotation-free `boundingBox`, so the orientation is available
at the call site and only the box computation drops it.
If that holds, the fix is one shared "world AABB" helper used by the four affected actions, with
the Model path converting the oriented box into a world AABB rather than forwarding it.
---
## ▼ FIELD 4 — Logs / raw responses
`bounds` on the yaw-90 part (Size 13.3 / 9 / 21.7):
```json
{
"path": "…C_yaw90",
"className": "Part",
"center": { "x": 5300, "y": 10, "z": 5000 },
"min": { "x": 5293.349999904633, "y": 5.5, "z": 4989.14999961853 },
"max": { "x": 5306.650000095367, "y": 14.5, "z": 5010.85000038147 },
"size": { "x": 13.300000190734863, "y": 9, "z": 21.700000762939453 }
}
```
Expected `size` for that part: `x: 21.7, y: 9, z: 13.3`.
The yaw-0, yaw-45, yaw-90 and Model cases all returned byte-identical `size` values
(`13.300000190734863 / 9 / 21.700000762939453`), differing only in the X offset of their centres.
**Suggested fix**
Build the AABB from the transformed corners, or via the absolute rotation matrix. All **three**
axes need it — case E (pitch) and case K (roll) report the wrong height, so an X/Z-only fix would
leave half the defect in place:
```lua
-- returns the world-AABB half-extents of an oriented box (cf, size)
local function worldHalfExtents(cf, s)
local r = cf.Rotation
local x, y, z = r.XVector, r.YVector, r.ZVector
return Vector3.new(
0.5 * (math.abs(x.X) * s.X + math.abs(y.X) * s.Y + math.abs(z.X) * s.Z),
0.5 * (math.abs(x.Y) * s.X + math.abs(y.Y) * s.Y + math.abs(z.Y) * s.Z),
0.5 * (math.abs(x.Z) * s.X + math.abs(y.Z) * s.Y + math.abs(z.Z) * s.Z)
)
end
-- Models: convert the oriented box instead of forwarding it
local cf, size = model:GetBoundingBox()
local half = worldHalfExtents(cf, size)
local min, max = cf.Position - half, cf.Position + half
-- Containers: union the children's WORLD extents, not their center +- Size/2 (see FIELD 6b)
local function subtreeAABB(root)
local mn, mx
for _, d in ipairs(root:GetDescendants()) do
if d:IsA("BasePart") then
local h = worldHalfExtents(d.CFrame, d.Size)
local a, b = d.Position - h, d.Position + h
mn = mn and Vector3.new(math.min(mn.X,a.X), math.min(mn.Y,a.Y), math.min(mn.Z,a.Z)) or a
mx = mx and Vector3.new(math.max(mx.X,b.X), math.max(mx.Y,b.Y), math.max(mx.Z,b.Z)) or b
end
end
return mn, mx
end
```
If the oriented box is also useful, returning both would be ideal — `size` as the world AABB plus
`localSize` + `cframe` for the oriented one. Mixing those two up is exactly how this class of bug
spreads: we made the identical mistake in our own generator code, and only found it because the
numbers stopped adding up. That is also why this one is worth fixing early — the call never fails,
it returns a well-formed, self-consistent, wrong box, and every downstream clearance or fit
calculation silently inherits it.
---
## ▼ FIELD 5 — Which box is actually returned (measured 2026-08-11)
We closed the one gap this report still had. The original case G used a 90-degree-symmetric
two-part layout, in which an oriented box and a world AABB are numerically identical - so it
could not discriminate. We rebuilt it asymmetrically, and now three candidate algorithms give
three different numbers, so the answer is decidable.
For each Model we computed, independently of Weppy: the true world AABB (8 transformed corners),
the naive union of unrotated child boxes (center +- Size/2), and `Model:GetBoundingBox()`.
| Model | true world AABB | naive union | `GetBoundingBox()` | `bounds` returned | matches |
|---|---|---|---|---|---|
| G1 - two equal parts crossed, symmetric (the old case G) | 10.00/4.00/10.00 | 10.00/4.00/4.00 | 10.00/4.00/10.00 | **10.00/4.00/10.00** | true AABB *and* GetBoundingBox - indistinguishable |
| G2 - two different parts, yaw 37 and yaw -52, offset | 35.16/4.00/24.09 | 31.00/4.00/19.00 | **26.01/4.00/24.14** | **26.01/4.00/24.14** | `GetBoundingBox()` exactly |
| G3 - as G2, second child axis-aligned | 28.79/4.00/23.41 | 29.00/4.00/18.00 | **24.57/4.00/26.41** | **24.57/4.00/26.41** | `GetBoundingBox()` exactly |
G2 and G3 match `Model:GetBoundingBox()` to the last reported decimal, and match neither the true
AABB nor the naive union. The Model pivot yaw was 37 degrees in both.
So `bounds` never computes a world AABB. What it returns depends on what you point it at — and
there turn out to be **three separate code paths with three different algorithms**, all presented
through the same world-space `min`/`max`/`size` shape:
| `path` points at | What `bounds` actually returns |
|---|---|
| a `BasePart` | the raw `Size` — the oriented box in the part's own frame |
| a `Model` | `Model:GetBoundingBox()` — the oriented box in the **pivot** frame |
| a container (`Folder`) | a **naive union** of each child's `center ± Size/2` |
The third row is new; see FIELD 6, where we tested containers and the pivot separately.
For Models this explains the earlier confusion: with a pivot yaw of 0 the oriented box *is* the
world AABB, which is why case G looked right. Our earlier framing of "a second, distinct cause for
Models" is withdrawn — it is the same "oriented box sold as axis-aligned" error, reached through a
different door. It also predicts the behaviour we had already measured: `ScaleTo(2)` is respected
because it scales the oriented box, and `PrimaryPart` changes nothing (case H) because only the
pivot orientation matters, not which part supplies it.
Reproduction, if useful: build a Model from two parts of different sizes at yaw 37 and yaw -52,
offset so the layout has no rotational symmetry, then compare `bounds` against
`Model:GetBoundingBox()` and against the 8-corner AABB. Test objects were created and deleted in
edit mode; nothing else in the place was touched.
**Last re-confirmed 2026-08-11 against a running MCP server 2.12.2**, one part, yaw 45,
`Size = (13.3, 9, 21.7)`:
| | X | Y | Z |
|---|---|---|---|
| true world AABB (8 transformed corners) | **24.75** | 9.00 | **24.75** |
| `bounds` → `size` | 13.30 | 9.00 | 21.70 |
`bounds` spanned X 5293.35 … 5306.65; the part really spans 5287.63 … 5312.37. Unchanged from the
tables above, so this is current behaviour and not a historical observation. The probe part was
deleted afterwards and a follow-up scan confirmed nothing was left behind.
---
## ▼ FIELD 6 — Two further tests that narrow the fix (measured 2026-08-11 on 2.12.2)
Both were run in edit mode on the current build; the probes were deleted afterwards and a scan
confirmed nothing was left behind.
**6a — It is the *pivot* orientation, with no rotated geometry involved at all.** This is the
cleanest isolation we have. A Model containing **one completely unrotated part**
(`Size = 8/4/20`, identity rotation), with only `Model.WorldPivot` set to yaw 45°:
| | X | Y | Z |
|---|---|---|---|
| true world AABB | **8.00** | 4.00 | 20.00 |
| `Model:GetBoundingBox()` | 19.80 | 4.00 | 19.80 |
| `bounds` → `size` | **19.799** | 4.00 | 19.799 |
Nothing in that model is rotated. Rotating only the pivot makes `bounds` report a box **2.47×
too wide** on X. So the defect does not need rotated geometry — the pivot alone triggers it, and
the returned value is `GetBoundingBox()` to the decimal.
⚠️ **Note the direction: here the reported box is far too LARGE.** Everywhere else in this report it
came out too small. The error is not conservative in either direction, so a caller cannot compensate
by padding.
**6b — Containers are a third code path, and it is a different algorithm again.** `bounds` on a
`Folder` holding two parts at yaw 90 and yaw 30 (`Size` 13.3/9/21.7 and 6/4/30):
| | X | Y | Z |
|---|---|---|---|
| true world AABB | **32.95** | 9.00 | 28.98 |
| naive union of `center ± Size/2` | 21.65 | 9.00 | 31.85 |
| `bounds` → `size` | **21.65** | 9.00 | **31.85** |
It matches the naive union exactly, and matches neither the true AABB nor any oriented box. So a
container is **not** handled like a Model — it unions the children's *unrotated* boxes. Note this
one is wrong in **both** directions at once: 11.3 studs too small on X, 2.9 studs too large on Z.
**Why this matters for the fix:** patching only the `BasePart` and `Model` paths would leave
containers broken, and containers are the common case for callers who pass a folder of props
rather than a single instance. A single shared "world AABB of this subtree" helper used by all
three entry points is what closes it.
**6c — Scope note in your favour: `collision` is not affected by the Model/container paths.**
We tried the 3c setup again with the rotated part wrapped in a Model, and `collision` refused it
outright:
```
{ "success": false, "error": "Instance must be a BasePart, got: Model" }
```
So `collision` is BasePart-only and **fails loudly** rather than computing a wrong box for a Model.
That is correct behaviour and worth knowing before you touch it: its defect is only the one in 3c
(a rotated *BasePart* producing a false negative). The three-path problem in 6a/6b belongs to
`bounds`.