summaryrefslogtreecommitdiff
path: root/platformer/src/physics.h
diff options
context:
space:
mode:
authorSchark <jordan@schark.online>2026-09-23 23:40:11 -0400
committerSchark <jordan@schark.online>2026-09-23 23:40:11 -0400
commit23ef8bc20310bdfad52b07a3f1e4e61c98896841 (patch)
tree007cc1d6d73ebb38d2e06422d4050f769dd65535 /platformer/src/physics.h
parentdab65412376d1b73381446f969c1461c24169811 (diff)
downloadgamedev-23ef8bc20310bdfad52b07a3f1e4e61c98896841.tar.gz
gamedev-23ef8bc20310bdfad52b07a3f1e4e61c98896841.zip
Working demogit add README.md src/
Diffstat (limited to 'platformer/src/physics.h')
-rw-r--r--platformer/src/physics.h12
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 */