diff --git a/assets/Models/Sid/Sid_Jump.dae b/assets/Models/Sid/Sid_Jump.dae
index d8ce03e..c036001 100644
--- a/assets/Models/Sid/Sid_Jump.dae
+++ b/assets/Models/Sid/Sid_Jump.dae
@@ -5,8 +5,8 @@
Blender User
Blender 2.75.0 commit date:2015-07-07, commit time:14:56, hash:c27589e
- 2015-10-23T14:55:47
- 2015-10-23T14:55:47
+ 2015-10-23T16:10:27
+ 2015-10-23T16:10:27
Z_UP
@@ -157,7 +157,7 @@
- 2.8213e-7 0 -1 0 0 -0.8 0 -0.305899 -1 0 -2.8213e-7 0 0 0 0 1 2.8213e-7 0 -1 0 0 -0.9999999 0 -0.305899 -1 0 -2.8213e-7 0 0 0 0 1
+ 2.8213e-7 0 -1 0 0 -0.9999999 0 -0.305899 -1 0 -2.8213e-7 0 0 0 0 1 2.8213e-7 0 -1 0 0 -0.6999999 0 -0.305899 -1 0 -2.8213e-7 0 0 0 0 1
@@ -189,7 +189,7 @@
- -4.53842e-7 0.6170548 0.7869204 0.1847505 1.46037e-7 -0.7869205 0.6170546 1.127367 1 8.9407e-8 2.73509e-7 -0.002287612 0 0 0 1 -4.39136e-7 0.5461221 0.8377058 0.1847505 1.58507e-7 -0.8377059 0.5461219 1.127367 1 6.76434e-8 2.61131e-7 -0.002287612 0 0 0 1
+ -4.53842e-7 0.6170548 0.7869204 0.1847505 1.46037e-7 -0.7869204 0.6170546 1.127367 1 8.9407e-8 2.73509e-7 -0.002287612 0 0 0 1 -4.39136e-7 0.5461221 0.8377058 0.1847505 1.58507e-7 -0.8377059 0.5461219 1.127367 1 6.76434e-8 2.61131e-7 -0.002287612 0 0 0 1
@@ -221,7 +221,7 @@
- -6.18379e-7 -0.6170548 -0.7869204 -0.1847505 3.71728e-7 -0.7869205 0.6170546 1.127367 -1 -2.08617e-7 7.33482e-7 -0.0022877 0 0 0 1 -6.46627e-7 -0.5461221 -0.8377058 -0.1847505 3.06338e-7 -0.8377059 0.5461219 1.127367 -1 -2.01547e-7 7.00461e-7 -0.0022877 0 0 0 1
+ -6.18379e-7 -0.6170548 -0.7869204 -0.1847505 3.71728e-7 -0.7869204 0.6170546 1.127367 -1 -2.08617e-7 7.33482e-7 -0.0022877 0 0 0 1 -6.46627e-7 -0.5461221 -0.8377058 -0.1847505 3.06338e-7 -0.8377059 0.5461219 1.127367 -1 -2.01547e-7 7.00461e-7 -0.0022877 0 0 0 1
@@ -637,7 +637,7 @@
- -4.37114e-8 0 -1 3.93099e-4 -6.29212e-8 0.9999999 7.10543e-15 -0.2065513 1 6.29212e-8 -4.37114e-8 -0.170607 0 0 0 1 -4.93163e-8 0.08715574 -0.9961947 3.93099e-4 -6.54522e-8 0.9961947 0.08715573 -0.2065513 1 6.95013e-8 -4.34241e-8 -0.170607 0 0 0 1
+ -3.13422e-8 6.23634e-9 -1 3.93099e-4 0.08979136 0.9959605 3.39689e-9 -0.2065513 0.9959606 -0.08979137 -3.17755e-8 -0.170607 0 0 0 1 -4.93163e-8 0.08715574 -0.9961947 3.93099e-4 -6.54522e-8 0.9961947 0.08715573 -0.2065513 1 6.95013e-8 -4.34241e-8 -0.170607 0 0 0 1
@@ -669,7 +669,7 @@
- 1 -6.29212e-8 1.19209e-7 0 6.29212e-8 1 0 0.2368225 -1.19209e-7 0 1 3.72529e-9 0 0 0 1 1 -5.99114e-8 1.13846e-7 0 4.97611e-8 0.9961947 0.08715574 0.2368225 -1.18635e-7 -0.08715574 0.9961947 3.72529e-9 0 0 0 1
+ 0.9647611 -0.2631273 1.49274e-7 0 0.2631273 0.9647611 4.47035e-8 0.2368225 -1.58325e-7 0 1 3.72529e-9 0 0 0 1 1 -5.99114e-8 1.13846e-7 0 4.97611e-8 0.9961947 0.08715574 0.2368225 -1.18635e-7 -0.08715574 0.9961947 3.72529e-9 0 0 0 1
@@ -701,7 +701,7 @@
- 1 -6.29212e-8 6.29211e-8 1.49012e-8 6.29212e-8 0.9999999 0 0.2368225 -6.29211e-8 -1.49012e-8 0.9999999 -1.49012e-8 0 0 0 1 1 -4.9761e-8 6.34957e-8 1.49012e-8 4.40376e-8 0.9961946 0.08715574 0.2368225 -6.75911e-8 -0.08715576 0.9961947 -1.49012e-8 0 0 0 1
+ 0.9018104 -0.432132 9.99244e-8 1.49012e-8 0.432132 0.9018103 1.04308e-7 0.2368225 -1.41561e-7 -4.47035e-8 0.9999999 -1.49012e-8 0 0 0 1 1 -4.9761e-8 6.34957e-8 1.49012e-8 4.40376e-8 0.9961946 0.08715574 0.2368225 -6.75911e-8 -0.08715576 0.9961947 -1.49012e-8 0 0 0 1
@@ -733,7 +733,7 @@
- 1 5.68864e-8 -6.13071e-8 0 -6.29211e-8 1 2.98023e-8 0.2368228 6.29211e-8 0 1 1.49012e-8 0 0 0 1 1 9.28881e-8 -4.82035e-8 0 -8.91413e-8 0.9848078 0.1736482 0.2368228 6.52151e-8 -0.1736482 0.9848078 1.49012e-8 0 0 0 1
+ 0.9406103 -0.3394882 -2.46615e-8 0 0.3394883 0.9406103 8.9407e-8 0.2368228 1.49012e-8 -8.9407e-8 1 1.49012e-8 0 0 0 1 1 9.28881e-8 -4.82035e-8 0 -8.91413e-8 0.9848078 0.1736482 0.2368228 6.52151e-8 -0.1736482 0.9848078 1.49012e-8 0 0 0 1
@@ -765,7 +765,7 @@
- 1 -1.08477e-8 -2.40456e-7 0 3.55271e-15 0.9999999 0 0.2368225 2.38419e-7 2.98023e-8 1 0 0 0 0 1 1 4.21468e-8 -2.34937e-7 0 2.99004e-8 0.9396926 0.3420201 0.2368225 2.33146e-7 -0.3420201 0.9396927 0 0 0 0 1
+ 0.9033983 -0.4288025 -1.74397e-7 0 0.4288025 0.9033982 -2.98023e-8 0.2368225 1.78814e-7 2.98023e-8 1 0 0 0 0 1 1 4.21468e-8 -2.34937e-7 0 2.99004e-8 0.9396926 0.3420201 0.2368225 2.33146e-7 -0.3420201 0.9396927 0 0 0 0 1
@@ -797,7 +797,7 @@
- 1 3.55271e-15 0 1.49012e-8 3.55271e-15 0.9999999 2.98023e-8 0.147557 3.55271e-15 0 1 5.96046e-8 0 0 0 1 1 -1.51808e-8 -1.32815e-9 1.49012e-8 1.51808e-8 0.9848077 0.1736482 0.147557 -1.32815e-9 -0.1736482 0.9848077 5.96046e-8 0 0 0 1
+ 0.8926221 -0.4508057 6.9957e-8 1.49012e-8 0.4508057 0.8926221 2.98023e-8 0.147557 -2.98023e-8 8.9407e-8 1 5.96046e-8 0 0 0 1 1 -1.51808e-8 -1.32815e-9 1.49012e-8 1.51808e-8 0.9848077 0.1736482 0.147557 -1.32815e-9 -0.1736482 0.9848077 5.96046e-8 0 0 0 1
@@ -829,7 +829,7 @@
- -2.8213e-7 0 -1 3.93073e-4 6.29212e-8 0.9999999 -2.13163e-14 -0.2065513 1 -6.29212e-8 -2.8213e-7 0.170607 0 0 0 1 -2.86828e-7 -0.08715574 -0.9961947 3.93073e-4 4.46726e-8 0.9961947 -0.08715573 -0.2065513 1 -6.95013e-8 -2.81843e-7 0.170607 0 0 0 1
+ -2.93183e-7 -2.30214e-8 -1 3.93073e-4 -0.08979136 0.9959605 3.39687e-9 -0.2065513 0.9959606 0.08979136 -2.94066e-7 0.170607 0 0 0 1 -2.86828e-7 -0.08715574 -0.9961947 3.93073e-4 4.46726e-8 0.9961947 -0.08715573 -0.2065513 1 -6.95013e-8 -2.81843e-7 0.170607 0 0 0 1
@@ -861,7 +861,7 @@
- 1 6.29212e-8 3.57628e-7 0 -6.29212e-8 1 0 0.2368225 -3.57628e-7 0 1 0 0 0 0 1 1 8.0691e-8 3.51358e-7 0 -4.9761e-8 0.9961947 -0.08715574 0.2368225 -3.57053e-7 0.08715574 0.9961947 0 0 0 0 1
+ 0.9647611 0.2631273 3.27563e-7 0 -0.2631273 0.9647611 4.47035e-8 0.2368225 -3.05474e-7 -1.3411e-7 1 0 0 0 0 1 1 8.0691e-8 3.51358e-7 0 -4.9761e-8 0.9961947 -0.08715574 0.2368225 -3.57053e-7 0.08715574 0.9961947 0 0 0 0 1
@@ -893,7 +893,7 @@
- 1 6.29212e-8 -6.29212e-8 -1.49012e-8 -6.29212e-8 0.9999999 0 0.2368225 6.29212e-8 1.49012e-8 0.9999999 1.49012e-8 0 0 0 1 1 4.9761e-8 -6.23466e-8 -1.49012e-8 -5.50055e-8 0.9961946 -0.08715574 0.2368225 5.77724e-8 0.08715576 0.9961947 1.49012e-8 0 0 0 1
+ 0.9018104 0.432132 -9.99244e-8 -1.49012e-8 -0.432132 0.9018103 8.9407e-8 0.2368225 1.11759e-7 -5.96046e-8 0.9999999 1.49012e-8 0 0 0 1 1 4.9761e-8 -6.23466e-8 -1.49012e-8 -5.50055e-8 0.9961946 -0.08715574 0.2368225 5.77724e-8 0.08715576 0.9961947 1.49012e-8 0 0 0 1
@@ -925,7 +925,7 @@
- 1 -6.9213e-8 6.54104e-8 -1.49012e-8 6.29211e-8 1 -2.98023e-8 0.2368228 -6.29212e-8 -2.98023e-8 1 -5.96046e-8 0 0 0 1 1 -7.64089e-8 7.17683e-8 -1.49012e-8 7.60813e-8 0.9961948 -0.0871558 0.2368228 -6.23466e-8 0.08715571 0.9961948 -5.96046e-8 0 0 0 1
+ 0.9406103 0.3394883 2.87647e-8 -1.49012e-8 -0.3394884 0.9406103 1.49012e-8 0.2368228 7.45058e-9 -7.45058e-8 1 -5.96046e-8 0 0 0 1 1 -7.64089e-8 7.17683e-8 -1.49012e-8 7.60813e-8 0.9961948 -0.0871558 0.2368228 -6.23466e-8 0.08715571 0.9961948 -5.96046e-8 0 0 0 1
@@ -957,7 +957,7 @@
- 1 1.01416e-8 -2.33831e-7 -1.49012e-8 -1.77636e-15 0.9999999 2.98023e-8 0.2368226 2.38419e-7 2.98023e-8 1 2.98023e-8 0 0 0 1 1 -2.65734e-9 -2.34158e-7 -1.49012e-8 -7.61939e-9 0.9961946 -0.0871557 0.2368226 2.38086e-7 0.08715576 0.9961948 2.98023e-8 0 0 0 1
+ 0.9033983 0.4288025 -2.9989e-7 -1.49012e-8 -0.4288025 0.9033982 0 0.2368226 2.5332e-7 1.49012e-7 1 2.98023e-8 0 0 0 1 1 -2.65734e-9 -2.34158e-7 -1.49012e-8 -7.61939e-9 0.9961946 -0.0871557 0.2368226 2.38086e-7 0.08715576 0.9961948 2.98023e-8 0 0 0 1
@@ -989,7 +989,7 @@
- 1 -7.00673e-10 -7.77575e-10 0 -3.55271e-15 1 -2.98023e-8 0.1475569 -1.77636e-15 2.98023e-8 1 2.98023e-8 0 0 0 1 1 1.43558e-8 -1.97223e-9 0 -1.51808e-8 0.9848078 -0.1736482 0.1475569 -1.32816e-9 0.1736482 0.9848077 2.98023e-8 0 0 0 1
+ 0.8926221 0.4508058 -7.07346e-8 0 -0.4508058 0.8926222 -5.96046e-8 0.1475569 4.47035e-8 8.9407e-8 1 2.98023e-8 0 0 0 1 1 1.43558e-8 -1.97223e-9 0 -1.51808e-8 0.9848078 -0.1736482 0.1475569 -1.32816e-9 0.1736482 0.9848077 2.98023e-8 0 0 0 1
diff --git a/assets/Sounds/Boss/boss-hit.wav b/assets/Sounds/Boss/boss-hit.wav
index b444809..5fe1096 100644
Binary files a/assets/Sounds/Boss/boss-hit.wav and b/assets/Sounds/Boss/boss-hit.wav differ
diff --git a/assets/Textures/GUI/KrakenSlider/KrakenArmSliderBackground.png b/assets/Textures/GUI/KrakenSlider/KrakenArmSliderBackground.png
new file mode 100755
index 0000000..3351332
Binary files /dev/null and b/assets/Textures/GUI/KrakenSlider/KrakenArmSliderBackground.png differ
diff --git a/assets/Textures/GUI/KrakenSlider/SpaceHit.png b/assets/Textures/GUI/KrakenSlider/SpaceHit.png
new file mode 100755
index 0000000..91f519d
Binary files /dev/null and b/assets/Textures/GUI/KrakenSlider/SpaceHit.png differ
diff --git a/assets/Textures/GUI/KrakenSlider/SpaceSpam.png b/assets/Textures/GUI/KrakenSlider/SpaceSpam.png
new file mode 100755
index 0000000..74d46fd
Binary files /dev/null and b/assets/Textures/GUI/KrakenSlider/SpaceSpam.png differ
diff --git a/include/Game/GUI/HUD.h b/include/Game/GUI/HUD.h
index 49310d4..bb51426 100644
--- a/include/Game/GUI/HUD.h
+++ b/include/Game/GUI/HUD.h
@@ -41,8 +41,10 @@ public:
m_FPSCounter = new GUI::FPSCounter(this, "FPSCounter");
m_KrakenAttackSlider = new Slider(this, "KrakenSlider");
- m_KrakenAttackSlider->SetTexture("Textures/GUI/Menu/SliderBackground.png");
- m_KrakenAttackSlider->SetTextureReleased("Textures/GUI/Menu/SliderHandle.png");
+ m_KrakenAttackSlider->SetTexture("Textures/GUI/KrakenSlider/KrakenArmSliderBackground.png");
+ m_KrakenAttackSlider->SetTextureReleased("Textures/GUI/KrakenSlider/SpaceSpam.png");
+ m_KrakenAttackSlider->SetTexturePressed("Textures/GUI/KrakenSlider/SpaceHit.png");
+
m_KrakenAttackSlider->SetLeft(Width / 2 - m_KrakenAttackSlider->Width / 2);
m_KrakenAttackSlider->Y = 800;
m_KrakenAttackSlider->Hide();
diff --git a/include/Game/KrakenSystem.h b/include/Game/KrakenSystem.h
index 20b4f11..311f5d1 100644
--- a/include/Game/KrakenSystem.h
+++ b/include/Game/KrakenSystem.h
@@ -103,6 +103,7 @@ private:
bool OnBrickGenerating(const dd::Events::BrickGenerating &event);
bool OnArrivedAtNewStage(const dd::Events::ArrivedAtNewStage &event);
void GetBrickSet();
+ void CreateBloodEffect(glm::vec3);
};
}
diff --git a/include/Physics/CParticleEmitter.h b/include/Physics/CParticleEmitter.h
index d4f795a..e3e3792 100755
--- a/include/Physics/CParticleEmitter.h
+++ b/include/Physics/CParticleEmitter.h
@@ -26,6 +26,8 @@ struct ParticleEmitter : public Component
//values to interpolate between.
std::vector ScaleValues;
std::vector AlphaValues;
+ std::vector VelocityValues;
+
//System variables
float GravityScale = 1.0f;
diff --git a/include/Physics/ECreateParticleSequence.h b/include/Physics/ECreateParticleSequence.h
index 19eb372..5f80de1 100644
--- a/include/Physics/ECreateParticleSequence.h
+++ b/include/Physics/ECreateParticleSequence.h
@@ -29,6 +29,7 @@ struct CreateParticleSequence : public Event
bool DefaultScale = false;
std::vector ScaleValues;
std::vector AlphaValues;
+ std::vector VelocityValues;
//Particle
std::string SpriteFile = "";
diff --git a/src/game/Game/BallSystem.cpp b/src/game/Game/BallSystem.cpp
index b669b45..ad95ff4 100644
--- a/src/game/Game/BallSystem.cpp
+++ b/src/game/Game/BallSystem.cpp
@@ -216,7 +216,8 @@ void dd::Systems::BallSystem::UpdateEntity(double dt, EntityID entity, EntityID
auto transform = m_World->GetComponent(entity);
glm::vec2 dir = glm::normalize(glm::vec2(transform->Velocity.x, transform->Velocity.y));
glm::vec2 up = glm::vec2(0.f, 1.f);
- float angle = glm::acos(glm::dot(dir, up)) * glm::sign(dir.x);
+
+ float angle = atan2(dir.x, dir.y);
transform->Orientation = glm::rotate(glm::quat(), angle, glm::vec3(0.f, 0.f, -1.f));
}
}
diff --git a/src/game/Game/KrakenSystem.cpp b/src/game/Game/KrakenSystem.cpp
index 45ca047..20d636c 100644
--- a/src/game/Game/KrakenSystem.cpp
+++ b/src/game/Game/KrakenSystem.cpp
@@ -337,47 +337,7 @@ bool dd::Systems::KrakenSystem::OnKrakenHit(const dd::Events::KrakenHit &event)
m_KrakenCurrentSecondsToAction = m_KrakenMaxSecondsToAction - (modifier * timeDifferenceBetweenMaxAndMin);
// If modifier is 1, MaxSeconds is 15, MinSeconds is 5, then... 15 - (1 * 10), meaning 5.
- auto ball = m_World->GetComponent(event.Hitter);
- if (ball != nullptr) {
- //Particle trail
- Events::CreateParticleSequence trail;
- trail.parent = event.Hitter;
- trail.AlphaValues.push_back(1.f);
- trail.AlphaValues.push_back(0.f);
- trail.ScaleValues.push_back(glm::vec3(0.08f));
- trail.ScaleValues.push_back(glm::vec3(0.f));
- trail.RadiusDistribution = 2;
- trail.EmitterLifeTime = 1.f;
- trail.ParticleLifeTime = 1.f;
- trail.ParticlesPerTick = 1;
- trail.SpawnRate = 0.5f;
- trail.Speed = 10.f;
- trail.EmittingAngle = glm::half_pi();
- trail.SpriteFile = "Textures/Particles/FadeBall.png";
- trail.Color = glm::vec4(1, 0, 0, 1);
- //p.Spread = ...
- EventBroker->Publish(trail);
- }
-
- //ParticlePoof
- Events::CreateParticleSequence poof;
- poof.EmitterLifeTime = 4;
- poof.EmittingAngle = glm::half_pi();
- poof.Spread = 0.5f;
- poof.NumberOfTicks = 1;
- poof.ParticleLifeTime = 1.5f;
- poof.ParticlesPerTick = 2;
- poof.Position = event.PlaceHit;
- poof.ScaleValues.clear();
- poof.ScaleValues.push_back(glm::vec3(0.5f));
- poof.ScaleValues.push_back(glm::vec3(2.f, 2.f, 0.2f));
- poof.SpriteFile = "Textures/Particles/Cloud_Particle.png";
- poof.Color = glm::vec4(1, 0, 0, 1);
- poof.AlphaValues.clear();
- poof.AlphaValues.push_back(1.f);
- poof.AlphaValues.push_back(0.f);
- poof.Speed = 20;
- EventBroker->Publish(poof);
+ CreateBloodEffect(event.PlaceHit);
//std::cout << kraken->Health << std::endl;
//kraken->Health = -1;
@@ -494,4 +454,70 @@ bool dd::Systems::KrakenSystem::OnArrivedAtNewStage(const dd::Events::ArrivedAtN
m_KrakenHasArrived = true;
}
return true;
+}
+
+void dd::Systems::KrakenSystem::CreateBloodEffect(glm::vec3 pos)
+{
+ //ParticlePoof
+ Events::CreateParticleSequence dust;
+ dust.EmitterLifeTime = 4;
+ dust.EmittingAngle = glm::half_pi();
+ dust.Spread = 0.5f;
+ dust.NumberOfTicks = 1;
+ dust.ParticleLifeTime = 1.f;
+ dust.ParticlesPerTick = 1;
+ dust.Position = pos;
+ dust.ScaleValues.clear();
+ dust.ScaleValues.push_back(glm::vec3(0.5f));
+ dust.ScaleValues.push_back(glm::vec3(2.f, 2.f, 0.2f));
+ dust.SpriteFile = "Textures/Particles/Cloud_Particle.png";
+ dust.Color = glm::vec4(1, 0, 0, 1);
+ dust.AlphaValues.clear();
+ dust.AlphaValues.push_back(1.f);
+ dust.AlphaValues.push_back(0.f);
+ dust.Speed = 20;
+ EventBroker->Publish(dust);
+ std::uniform_real_distribution dist(glm::pi(), glm::two_pi());
+ for (int i = 0; i < 3; i++) {
+ float angle = dist(m_RandomGenerator);
+
+ Events::CreateParticleSequence squirt;
+ squirt.EmitterLifeTime = 0.3f;
+ squirt.EmittingAngle = angle;
+ squirt.Spread = 0;
+ squirt.SpawnRate = 0.01f;
+ squirt.ParticleLifeTime = 0.5f;
+ squirt.ParticlesPerTick = 1;
+ squirt.Position = pos;
+ squirt.ScaleValues.clear();
+ squirt.ScaleValues.push_back(glm::vec3(0.09f));
+ squirt.SpriteFile = "Textures/Particles/FadeBall.png";
+ squirt.Color = glm::vec4(1, 0, 0, 1);
+ squirt.AlphaValues.clear();
+ squirt.AlphaValues.push_back(1.f);
+ squirt.AlphaValues.push_back(0.f);
+ squirt.Speed = 1000;
+ EventBroker->Publish(squirt);
+ }
+ Events::CreateParticleSequence drop;
+ drop.EmitterLifeTime = 7.f;
+ drop.SpawnRate = 0.1f;
+ //drop.EmittingAngle = glm::two_pi() + glm::pi();
+ drop.EmittingAngle = -glm::half_pi();
+ drop.Spread = 0;
+ //drop.Spread = glm::two_pi();
+ drop.ParticleLifeTime = 1.f;
+ drop.ParticlesPerTick = 2;
+ drop.Position = pos;
+ drop.ScaleValues.clear();
+ drop.ScaleValues.push_back(glm::vec3(.15f));
+ drop.ScaleValues.push_back(glm::vec3(0.1f));
+ drop.SpriteFile = "Textures/Particles/FadeBall.png";
+ drop.Color = glm::vec4(1, 0, 0, 1);
+ drop.AlphaValues.clear();
+ drop.AlphaValues.push_back(1.f);
+ drop.AlphaValues.push_back(0.f);
+ drop.GravityScale = 0;
+ drop.Speed = 300;
+ EventBroker->Publish(drop);
}
\ No newline at end of file
diff --git a/src/game/Physics/PhysicsSystem.cpp b/src/game/Physics/PhysicsSystem.cpp
index acdb631..cbda72c 100755
--- a/src/game/Physics/PhysicsSystem.cpp
+++ b/src/game/Physics/PhysicsSystem.cpp
@@ -222,10 +222,10 @@ void dd::Systems::PhysicsSystem::Update(double dt)
for (auto i : m_EntitiesToParticleHandle[e]){
EntityID entity = i.first;
const b2ParticleHandle *particleH = i.second;
-
+
b2Vec2 positionB2 = positionBuffer[particleH->GetIndex()];
glm::vec2 position = glm::vec2(positionB2.x, positionB2.y);
-
+
EntityID entityParent = m_World->GetEntityParent(entity);
glm::vec3 parentTransform = glm::vec3(0.f);
if(entityParent) {
@@ -592,7 +592,7 @@ void dd::Systems::PhysicsSystem::UpdateParticleEmitters(double dt)
//Random z-value
- std::uniform_real_distribution dist(0, 1);
+ std::uniform_real_distribution dist(0, 0.1);
float zDistribution = dist(gen);
particleTransform->Position = glm::vec3(emitterTransform->Position.x, emitterTransform->Position.y, -9.5f + zDistribution);
particleTransform->Scale = particleTemplate->Scale;
@@ -730,6 +730,7 @@ bool dd::Systems::PhysicsSystem::CreateParticleSequence(const Events::CreatePart
particleEmitter->RadiusDistribution = event.RadiusDistribution;
particleEmitter->DefaultScale = event.DefaultScale;
particleEmitter->ScaleValues = event.ScaleValues;
+ particleEmitter->VelocityValues = event.VelocityValues;
{
//Creating Particle Template
auto particle = m_World->CreateEntity(emitter);