From 63d2e9cbf4508d5118c654e81ea4da33763dc73f Mon Sep 17 00:00:00 2001 From: sotech117 Date: Fri, 10 May 2024 13:34:09 -0400 Subject: jess updated --- src/particlesystem.cpp | 10 +++++----- src/particlesystem.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/particlesystem.cpp b/src/particlesystem.cpp index 65d61ac..3e94862 100644 --- a/src/particlesystem.cpp +++ b/src/particlesystem.cpp @@ -45,10 +45,10 @@ Eigen::Vector3f particlesystem::getRandomInitialVel(){ } Eigen::Vector3f getInitVel(OceanSpray s){ - float x = getRandomInRange(0,1); - float y = getRandomInRange(0.1, .9); + float x = getRandomInRange(.6,4); + float y = getRandomInRange(0.5, 1.5); Eigen::Vector3f v = Eigen::Vector3f(s.slope_vector[0], y, s.slope_vector[1]) + Eigen::Vector3f(x,0,0); - return v*10.f; + return v*300.f; //p.vel[1] = 0.1; @@ -107,9 +107,9 @@ void particlesystem::update(double deltaTime){ // if particle is still alive, update pos if (p.life >= 0.f){ - float r = getRandomInRange(.5, 1.6f); + float r = getRandomInRange(30, 80.f); p.vel += gravity*dt*r; - p.pos += p.vel * dt * 10.f; + p.pos += p.vel * dt; // p.vel[1] -= (p.vel.dot(p.vel) / 2 + gravity[0]) * dt; // p.pos += p.vel * dt * 10.f; } diff --git a/src/particlesystem.h b/src/particlesystem.h index 608e229..26cb3f4 100644 --- a/src/particlesystem.h +++ b/src/particlesystem.h @@ -57,7 +57,7 @@ private: - float d = 2.f; + float d = 50.f; std::vector m_vertices = { -d, d, 0,1, -d, -d, 0, 0, -- cgit v1.2.3-70-g09d2