feat: COLISIONS AND RADIUS INCLUDED

This commit is contained in:
AfonsoCMSousa
2026-03-24 01:15:07 +00:00
parent 45ed43a968
commit d3510b2ce8
3 changed files with 8 additions and 12 deletions
+3 -3
View File
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include <unistd.h>
#define G_CONSTANT 0.65f
#define G_CONSTANT 1.98f
typedef struct {
float x, y, z;
@@ -169,8 +169,8 @@ void *t_update(void *args) {
p.position.y += p.velocity.y * params->time;
p.position.z += p.velocity.z * params->time;
if (p.position.y <= 0) {
p.position.y = 0;
if (p.position.y <= 0 + p.radius) {
p.position.y = 0 + p.radius;
p.velocity.y *= (-1 * p.dampening);
}