Sfoglia il codice sorgente

Simplify perspective camera projection

Daniel Salvadori 6 anni fa
parent
commit
7d69a6540b
1 ha cambiato i file con 1 aggiunte e 5 eliminazioni
  1. 1 5
      camera/perspective.go

+ 1 - 5
camera/perspective.go

@@ -84,11 +84,7 @@ func (cam *Perspective) Project(v *math32.Vector3) (*math32.Vector3, error) {
 
 	// Get camera view matrix
 	var matrix math32.Matrix4
-	matrixWorld := cam.MatrixWorld()
-	err := matrix.GetInverse(&matrixWorld)
-	if err != nil {
-		return nil, err
-	}
+	cam.ViewMatrix(&matrix)
 
 	// Update camera projection matrix
 	cam.updateProjMatrix()