]> git.localhorst.tv Git - gworm.git/commitdiff
different entity integration approach
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 15 Jan 2014 13:59:40 +0000 (14:59 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 15 Jan 2014 13:59:40 +0000 (14:59 +0100)
src/world/Entity.cpp

index d1cf34d74bd983a9038c3231a5e639d92366b5e1..06a27c333fd6be269d6b6bdc5c8feafa090ea5ca 100644 (file)
@@ -13,9 +13,13 @@ Entity::Entity()
 
 
 void Entity::Update(float dt) {
-       // euler
+       // linear
+       pos += (dt * vel) + (acc * dt * dt / 2.0f);
        vel += dt * acc;
-       pos += dt * vel;
+
+       // euler
+       //vel += dt * acc;
+       //pos += dt * vel;
 }
 
 }