Continued work on water, can now get 1 particle? maybe? Gotta get rendering to work so i can test it.
This commit is contained in:
@@ -22,6 +22,8 @@ void dd::Systems::PhysicsSystem::Initialize()
|
||||
|
||||
m_PhysicsWorld->SetContactListener(m_ContactListener);
|
||||
|
||||
InitializeWater();
|
||||
|
||||
EVENT_SUBSCRIBE_MEMBER(m_SetImpulse, PhysicsSystem::SetImpulse);
|
||||
}
|
||||
|
||||
@@ -225,15 +227,23 @@ void dd::Systems::PhysicsSystem::CreateParticleGroup(EntityID e)
|
||||
LOG_ERROR("No Transform component in CreateParticleGroup");
|
||||
return;
|
||||
}
|
||||
LOG_INFO("------ CREATING PARTICLE GROUP");
|
||||
|
||||
b2ParticleGroupDef pd;
|
||||
b2PolygonShape shape;
|
||||
|
||||
shape.SetAsBox(transform->Scale.x, transform->Scale.y);
|
||||
pd.shape = &shape;
|
||||
pd.flags = b2_elasticParticle;
|
||||
pd.angle = -0.5f;
|
||||
pd.angularVelocity = 2.0f;
|
||||
pd.position.Set(transform->Position.x, transform->Position.y);
|
||||
//pd.particleCount = 10;
|
||||
//TODO: PUT IN LIST
|
||||
t_watergroup = m_ParticleSystem->CreateParticleGroup(pd);
|
||||
LOG_INFO("ParticleCount: %i", t_watergroup->GetParticleCount());
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
dd::Systems::PhysicsSystem::~PhysicsSystem()
|
||||
|
||||
Reference in New Issue
Block a user