projects
/
physics.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
renamed libpg to libbear
[physics.git]
/
src
/
Entities
/
PhysicsEntity.cpp
diff --git
a/src/Entities/PhysicsEntity.cpp
b/src/Entities/PhysicsEntity.cpp
index
3354fe2
..
060ef62
100644
(file)
--- a/
src/Entities/PhysicsEntity.cpp
+++ b/
src/Entities/PhysicsEntity.cpp
@@
-16,16
+16,18
@@
*/
#include "PhysicsEntity.h"
*/
#include "PhysicsEntity.h"
-#include "../debug.h"
-#include "../effectManager.h"
-#include "../Vector2.h"
+#include <bear/debug.h>
+#include <bear/Vector2.h>
+using namespace bear;
+
+#include "effectManager.h"
/// ***** Constructors/Destructors *****
PhysicsEntity::PhysicsEntity(const Vector2& pos)
/// ***** 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;
}
{
velocity += impulse;
}
+
+void PhysicsEntity::applyNudge(const Vector2& vecPush)
+{
+ position += vecPush;
+}