Early edits and ray.c fix by reversing gravity
This commit is contained in:
9
ray.c
9
ray.c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user