aboutsummaryrefslogtreecommitdiff
path: root/src/entity.h
diff options
context:
space:
mode:
authornathansmithsmith <thenathansmithsmith@gmail.com>2023-07-21 00:12:00 -0600
committernathansmithsmith <thenathansmithsmith@gmail.com>2023-07-21 00:12:00 -0600
commitd4b40dcf7589bef2bbd0b6b940ee992da9db2343 (patch)
tree42756cfe9a23382bc406732fdfeccce64fddb6d4 /src/entity.h
parent43e31b6e124da754ef928d22fbb9a1d7640aab4b (diff)
Working collision system
Diffstat (limited to 'src/entity.h')
-rw-r--r--src/entity.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/entity.h b/src/entity.h
index 844386c..1ac3422 100644
--- a/src/entity.h
+++ b/src/entity.h
@@ -63,6 +63,7 @@ typedef struct Entity {
EntityType type;
Model * model;
+ float radius; // Used for quick collision detection.
Vector3 position;
Quaternion rotation;
@@ -102,7 +103,8 @@ const extern EntityTypeInfo entityTypeInfo[ENTITY_TYPE_COUNT];
Entity createEntity(EntityType type, Game * game);
void closeEntity(Entity * entity);
-bool entitiesCollide(Entity entity1, Entity entity2);
+void setEntityRadius(Entity * entity); // Uses model to set radius;
+bool checkEntityCollision(Entity entity1, Entity entity2);
// Helper functions for updating and drawing.
void entityDraw(Entity * entity);