Run fn with the object's children temporarily DETACHED (plain array swap — no
three add/remove events, so no scene/hierarchy churn): three-mesh-bvh's
StaticGeometryGenerator traverses the object it is given, and a skinned mesh's
BVH must represent the mesh ALONE — children raycast separately, and a child's
attributes may not even merge (editor-reparented plain meshes inside rigs).
Bones are unaffected for the duration: skinning reads skeleton.boneMatrices,
not graph children. Exported for tests.
Run
fnwith the object's children temporarily DETACHED (plain array swap — no three add/remove events, so no scene/hierarchy churn): three-mesh-bvh's StaticGeometryGenerator traverses the object it is given, and a skinned mesh's BVH must represent the mesh ALONE — children raycast separately, and a child's attributes may not even merge (editor-reparented plain meshes inside rigs). Bones are unaffected for the duration: skinning reads skeleton.boneMatrices, not graph children. Exported for tests.