diff options
author | David Thompson <dthompson2@worcester.edu> | 2021-09-21 20:20:08 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2021-09-21 20:34:43 -0400 |
commit | 96b3a372b58c8181ef9fb401f1502457f5ab6e6c (patch) | |
tree | 9ca960d68f47299867193cb62dfdd6dc89678925 /examples/model.scm | |
parent | f4265facfa7d8d14a934473f6c103122cb540f67 (diff) |
examples: model: Fix view matrix.
Diffstat (limited to 'examples/model.scm')
-rw-r--r-- | examples/model.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/model.scm b/examples/model.scm index 8ba9b4a..3e17588 100644 --- a/examples/model.scm +++ b/examples/model.scm @@ -47,9 +47,10 @@ (vec3-z position))) ;; Compute new view matrix - (matrix4-translate! translation position) - (matrix4-identity! view-matrix) - (matrix4-mult! view-matrix view-matrix translation) + (look-at! view-matrix + position + (vec3+ position (vec3 0.0 0.0 1.0)) + (vec3 0.0 1.0 0.0)) ;; Rotate the model about the y-axis (set! y-rotation (+ y-rotation 0.03)) |