summaryrefslogtreecommitdiff
path: root/platformer/src/physics.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 */