소스 검색

Simplify perspective camera projection

Daniel Salvadori 6 년 전
부모
커밋
7d69a6540b
1개의 변경된 파일1개의 추가작업 그리고 5개의 파일을 삭제
  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()