diff --git a/src/corelib/world.c b/src/corelib/world.c index fa92ea7..85fbed4 100644 --- a/src/corelib/world.c +++ b/src/corelib/world.c @@ -110,7 +110,7 @@ static inline short _collision_circle_aabb(const object_t* circle, const object_t* aabb) { // generate a point on the edge of the rectangle that is closest to the circle const float bbminx = aabb->collider.aabb.x + aabb->sprite.x, bbmaxx = bbminx + aabb->collider.aabb.w, - bbminy = aabb->collider.aabb.y + aabb->sprite.x, bbmaxy = bbminy + aabb->collider.aabb.h; + bbminy = aabb->collider.aabb.y + aabb->sprite.y, bbmaxy = bbminy + aabb->collider.aabb.h; const float cx = circle->sprite.x + circle->collider.circle.x, cy = circle->sprite.y + circle->collider.circle.y; const float x = fclampf(cx, bbminx, bbmaxx),