aboutsummaryrefslogtreecommitdiff
path: root/src/world.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/world.h
parent43e31b6e124da754ef928d22fbb9a1d7640aab4b (diff)
Working collision system
Diffstat (limited to 'src/world.h')
-rw-r--r--src/world.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/world.h b/src/world.h
index b3a7d69..9e36dc7 100644
--- a/src/world.h
+++ b/src/world.h
@@ -35,6 +35,10 @@ KfError removeEntityFromWorld(World * world, EntityId id);
void updateWorld(World * world, Game * game);
void drawWorld(World * world, Game * game);
+// Returns the closest entity that the ray hits or ENTITY_NONE;
+// From can be used to stop it from hitting the entity the ray is coming from...
+EntityId traceRayToEntityInWorld(World * world, Ray ray, EntityFingerprint from, bool useFrom);
+
// Used for creating worlds.
typedef struct WorldEntry {
EntityType type;