summaryrefslogtreecommitdiffhomepage
path: root/src/physics.hpp
blob: e26df1559ee9a978152fa89613e1e12016a15bad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once
#include "raylib.h"

namespace Physics {

	class Body {
		public:
			Vector2 position;
			Vector2 velocity;
			float mass;
			Body(Vector2 position, Vector2 velocity, float mass);
	};

	extern Body ship;// = Body((Vector2){50,50}, (Vector2){0,1}, 1);
	extern Body rock;// = Body((Vector2){400,400}, (Vector2){0,0}, 50);

	//0.01667
	void step(float deltaTime);
    Vector2 get_grav_force(Body body1, Body body2);
}