Преглед на файлове

fixed Node.matNeedsUpdate

Daniel Salvadori преди 7 години
родител
ревизия
a11b991caa
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      core/node.go

+ 2 - 1
core/node.go

@@ -632,6 +632,7 @@ func (n *Node) SetMatrix(m *math32.Matrix4) {
 
 	n.matrix = *m
 	n.matrix.Decompose(&n.position, &n.quaternion, &n.scale)
+	n.matNeedsUpdate = true
 }
 
 // Matrix returns a copy of the local transformation matrix.
@@ -697,7 +698,7 @@ func (n *Node) MatrixWorld() math32.Matrix4 {
 // of this node based on its position, quaternion, and scale.
 func (n *Node) UpdateMatrix() bool {
 
-	if !n.matNeedsUpdate && !n.rotNeedsUpdate {
+	if !n.matNeedsUpdate {
 		return false
 	}
 	n.matrix.Compose(&n.position, &n.quaternion, &n.scale)