generated from AfonsoCMSousa/CPP-OpenGLTemplate
fix: physics tweak
This commit is contained in:
parent
d3510b2ce8
commit
a1f868c27b
@ -63,7 +63,7 @@ Particle particle_init(Vec3 position, Color color) {
|
||||
p.color = color;
|
||||
p.velocity = {0.0f, 0.0f, 0.0f};
|
||||
|
||||
p.life = -2.0f; // INFO: Imorta
|
||||
p.life = -2.0f; // INFO: Imortal
|
||||
p.dampening = 0.9f;
|
||||
p.radius = 0.05f;
|
||||
return p;
|
||||
|
||||
@ -22,8 +22,8 @@ const char VERTEX_SHADER_SOURCE[] = "./source/shader/vertex.glsl";
|
||||
const char PROGRAM_NAME[] = "Particle Sim";
|
||||
const unsigned int THREAD_COUNT = 1;
|
||||
|
||||
const unsigned int SCR_WIDTH = 1920;
|
||||
const unsigned int SCR_HEIGHT = 1080;
|
||||
const unsigned int SCR_WIDTH = 2560;
|
||||
const unsigned int SCR_HEIGHT = 1440;
|
||||
const char *glsl_version;
|
||||
|
||||
const unsigned int PARTICLE_COUNT = 3;
|
||||
@ -220,7 +220,7 @@ int main() {
|
||||
if (particles == NULL) {
|
||||
snprintf(errLog, 128, "There was a issue allocating memory for the particle list\n");
|
||||
} else {
|
||||
particles[0] = particle_init({1.000001f, 1.0f, 0.97f}, {1.0f, 0.0f, 0.0f, 255.0f});
|
||||
particles[0] = particle_init({1.000001f, 1.0f, 0.994f}, {1.0f, 0.0f, 0.0f, 255.0f});
|
||||
particles[1] = particle_init({1.0f, 1.2f, 1.0f}, {0.0f, 1.0f, 0.0f, 255.0f});
|
||||
particles[2] = particle_init({0.99995f, 1.4f, 1.004f}, {0.0f, 0.0f, 1.0f, 255.0f});
|
||||
}
|
||||
@ -293,7 +293,7 @@ int main() {
|
||||
for (int i = 0; i < THREAD_COUNT; i++)
|
||||
alive_count += thread_params[i].alive_count;
|
||||
|
||||
collision_update(particles, alive_count, 0.06f);
|
||||
collision_update(particles, alive_count, 0.7f);
|
||||
|
||||
// Render
|
||||
glClearColor(0.03f, 0.03f, 0.03f, 1.0f);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user