fixed velocity math mistake, updated gravtiy well force to look better master
authorPatrik Gornicz <Gornicz.P@gmail.com>
Mon, 6 Sep 2010 17:03:34 +0000 (13:03 -0400)
committerPatrik Gornicz <Gornicz.P@gmail.com>
Mon, 6 Sep 2010 17:03:57 +0000 (13:03 -0400)
physics/src/Effects/GravityWell.cpp
physics/src/Entities/PhysicsEntity.cpp

index 38711eb..71d80b0 100644 (file)
@@ -18,7 +18,7 @@
 #include "GravityWell.h"
 #include "Entities/PhysicsEntity.h"
 
-float wellGravity = 0.5;
+float wellGravity = 0.25;
 
 /// ***** Constructors/Destructors *****
 
index 752d5eb..745ab80 100644 (file)
@@ -67,7 +67,7 @@ Vector2 PhysicsEntity::velocityAt(float time_step) const
     newForce += effect::forceDelta(this, time_step);
     newVelocity += effect::velocityDelta(this, time_step);
 
-    return newForce/m_mass / 2 * time_step + newVelocity;
+    return newForce/m_mass * time_step + newVelocity;
 }
 
 void PhysicsEntity::applyForce(const Vector2& force)