Cannot read property 'matrixWorld' of undefined

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2021 May 4 3:17
Editor
Edited
Edited
2025 Nov 14 1:11
Refs
Refs
Cannot read property 'matrixWorld' of undefined
 

no

getBoxEdges(box) { const offset = this.cloud.offset const geometry = box.geometry const ltw = box.localToWorld const coors = geometry.vertices.map(xyz => { const world = ltw(xyz) return [world.x + offset[0], world.y + offset[1], world.z + offset[2]] }) return coors }
 

yes

getBoxEdges(box) { const offset = this.cloud.offset const geometry = box.geometry const coors = geometry.vertices.map(xyz => { const world = box.localToWorld(xyz) return [world.x + offset[0], world.y + offset[1], world.z + offset[2]] }) return coors }

Recommendations