summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/model.scm7
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))