X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=blobdiff_plain;f=src%2FEntities%2FPhysicsEntity.cpp;h=060ef62abe9eccc215fa674b9466e14b3a2eb0dd;hb=5e0713e5967be038b1b0cc5f0ffbd0180e3f7099;hp=3354fe22989aae50fb93f50e410bbc5eee2bce20;hpb=54fe85c5d10e60da6a9c9bbde11f7215723da572;p=physics.git diff --git a/src/Entities/PhysicsEntity.cpp b/src/Entities/PhysicsEntity.cpp index 3354fe2..060ef62 100644 --- a/src/Entities/PhysicsEntity.cpp +++ b/src/Entities/PhysicsEntity.cpp @@ -16,16 +16,18 @@ */ #include "PhysicsEntity.h" -#include "../debug.h" -#include "../effectManager.h" -#include "../Vector2.h" +#include +#include +using namespace bear; + +#include "effectManager.h" /// ***** Constructors/Destructors ***** PhysicsEntity::PhysicsEntity(const Vector2& pos) - : Entity(pos), force(0,0), mass(1), CoR(1) + : Entity(pos), force(0,0), mass(1), CoR(0.8) { } @@ -85,3 +87,8 @@ void PhysicsEntity::applyImpulse(const Vector2& impulse, const Vector2& at) { velocity += impulse; } + +void PhysicsEntity::applyNudge(const Vector2& vecPush) +{ + position += vecPush; +}