diff options
| author | Schark <jordan@schark.online> | 2026-09-23 23:40:11 -0400 |
|---|---|---|
| committer | Schark <jordan@schark.online> | 2026-09-23 23:40:11 -0400 |
| commit | 23ef8bc20310bdfad52b07a3f1e4e61c98896841 (patch) | |
| tree | 007cc1d6d73ebb38d2e06422d4050f769dd65535 /platformer/src/physics.h | |
| parent | dab65412376d1b73381446f969c1461c24169811 (diff) | |
| download | gamedev-23ef8bc20310bdfad52b07a3f1e4e61c98896841.tar.gz gamedev-23ef8bc20310bdfad52b07a3f1e4e61c98896841.zip | |
Working demogit add README.md src/
Diffstat (limited to '')
| -rw-r--r-- | platformer/src/physics.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/platformer/src/physics.h b/platformer/src/physics.h index dfbfebb..580d09b 100644 --- a/platformer/src/physics.h +++ b/platformer/src/physics.h @@ -33,4 +33,16 @@ #ifndef PHYSICS_H #define PHYSICS_H +#include <stdbool.h> + +#include "math3d.h" + +typedef struct Body { + Vec3 pos; /* position of the body's FEET (bottom center), meters */ + Vec3 vel; /* velocity, meters/second */ + bool on_ground; /* true if the body ended the last step standing on ground */ +} Body; + +void physics_step(Body *b, float dt); + #endif /* PHYSICS_H */ |
