Explorar o código

Fix Graphic bounding box

Daniel Salvadori %!s(int64=3) %!d(string=hai) anos
pai
achega
b5c63e94be
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      graphic/graphic.go

+ 2 - 0
graphic/graphic.go

@@ -234,6 +234,8 @@ func (gr *Graphic) BoundingBox() math32.Box3 {
 
 	geom := gr.igeom.GetGeometry()
 	bbox := geom.BoundingBox()
+	m := gr.MatrixWorld()
+	bbox.ApplyMatrix4(&m)
 	for _, inode := range gr.Children() {
 		childGraphic, ok := inode.(*Graphic)
 		if ok {