Working ray.c

This commit is contained in:
2026-06-15 11:20:05 -04:00
parent d40cc9b484
commit 123063b3c5
3 changed files with 30 additions and 8 deletions

9
ray.c
View File

@@ -1,8 +1,15 @@
// ray.c A-0-i by team wholeworldcoding.
// working physics simulation with 1 object, limited playground and fixed parameters
// This is P7MJ, out.
// Changes:
// Reversing gravity makes it work?!!!
#include <stdio.h>
#include <stdlib.h>
#include "raylib.h"
const float g = -9.81;
const float g = 9.81; // Gravity is inversed cause raylib uses top right corner as origin
float obj_x = 100; // Starting X (pixels)
float obj_y = 100; // Starting Y (pixels)
float obj_vel_x = 50; // Velocity X (pixels/second)