]> git.localhorst.tv Git - blank.git/blobdiff - src/model.cpp
lousy implementation of camera movement
[blank.git] / src / model.cpp
index 4ee621afbb614605acd7dd3a02674721e6d3bc3c..7335ed9a5c3ec35a91219180e6105d8436f4a2d3 100644 (file)
@@ -8,7 +8,8 @@
 namespace blank {
 
 Model::Model()
-: position(0, 0, 0)
+: velocity(0, 0, 0)
+, position(0, 0, 0)
 , pitch(0)
 , yaw(0) {
 
@@ -23,4 +24,9 @@ glm::mat4 Model::Transform() const {
        return glm::translate(position) * glm::eulerAngleYX(yaw, pitch);
 }
 
+
+void Model::Update(int dt) {
+       position += velocity * float(dt);
+}
+
 }