Skip to content

Commit 0037a62

Browse files
Updated tracking camera based on feedback
#80 (comment)
1 parent 66720d0 commit 0037a62

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Tutorials/BasicCameraExample/BasicCameraExample.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -310,14 +310,8 @@ void UpdateTrackingCamera()
310310
{
311311
// Tracking view, the camera is always in the same position but changes the view matrix to "look" towards a target.
312312

313-
// Create a vector pointing the direction the camera is facing.
314-
Vector3 transformedReference = Vector3.Transform(modelPosition, Matrix.Identity);
315-
316-
// Calculate the position the camera is looking at.
317-
Vector3 cameraLookat = transformedReference + modelPosition;
318-
319313
// Set up our world matrix, view matrix and projection matrix.
320-
UpdateCameraView(cameraFixedPosition, cameraLookat);
314+
UpdateCameraView(cameraFixedPosition, modelPosition);
321315
}
322316

323317
void UpdateFirstPersonCamera()

0 commit comments

Comments
 (0)