From d4b40dcf7589bef2bbd0b6b940ee992da9db2343 Mon Sep 17 00:00:00 2001 From: nathansmithsmith Date: Fri, 21 Jul 2023 00:12:00 -0600 Subject: Working collision system --- src/world.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/world.h') 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; -- cgit v1.2.3