fixed more bugs
This commit is contained in:
@@ -58,7 +58,7 @@ namespace dd
|
|||||||
struct Impulse
|
struct Impulse
|
||||||
{
|
{
|
||||||
b2Body* Body;
|
b2Body* Body;
|
||||||
b2Vec2 Impulse;
|
b2Vec2 Vector;
|
||||||
b2Vec2 Point;
|
b2Vec2 Point;
|
||||||
};
|
};
|
||||||
bool m_Pause = false;
|
bool m_Pause = false;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ bool dd::Systems::PhysicsSystem::SetImpulse(const Events::SetImpulse &event)
|
|||||||
|
|
||||||
Impulse i;
|
Impulse i;
|
||||||
i.Body = it->second;
|
i.Body = it->second;
|
||||||
i.Impulse = impulse;
|
i.Vector = impulse;
|
||||||
i.Point = point;
|
i.Point = point;
|
||||||
|
|
||||||
m_Impulses.push_back(i);
|
m_Impulses.push_back(i);
|
||||||
@@ -155,7 +155,7 @@ void dd::Systems::PhysicsSystem::Update(double dt)
|
|||||||
|
|
||||||
//Apply Impulses Must be done after SyncEntitiesWithBodies
|
//Apply Impulses Must be done after SyncEntitiesWithBodies
|
||||||
for (auto i : m_Impulses) {
|
for (auto i : m_Impulses) {
|
||||||
i.Body->ApplyLinearImpulse(i.Impulse, i.Point, true);
|
i.Body->ApplyLinearImpulse(i.Vector, i.Point, true);
|
||||||
}
|
}
|
||||||
m_Impulses.clear();
|
m_Impulses.clear();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user