Tweak colliders depth and collider rendering

This commit is contained in:
2023-11-09 09:41:27 +01:00
parent 913a365a21
commit ced7aa2ea5
4 changed files with 30 additions and 32 deletions

View File

@@ -258,17 +258,15 @@ void bzTileMapDrawColliders(BzTileMap *map) {
switch (shape.type) {
case BZ_TILE_SHAPE_NONE:
break;
case BZ_TILE_SHAPE_POINT:
DrawCircle(posX, posY, 1.0f, color);
default:
break;
case BZ_TILE_SHAPE_RECT:
DrawRectangle(posX, posY, sizeX, sizeY, color);
DrawRectangleLines(posX, posY, sizeX, sizeY, color);
break;
case BZ_TILE_SHAPE_ELLIPSE:
sizeX *= 0.5f;
sizeY *= 0.5f;
DrawEllipse(posX + sizeX, posY + sizeY, sizeX, sizeY, color);
DrawEllipseLines(posX + sizeX, posY + sizeY, sizeX, sizeY, color);
break;
}
}

View File

@@ -6,7 +6,7 @@
#define BZ_MAX_MAP_LAYERS 8
#define BZ_MAX_MAP_TILESETS 8
#define BZ_MAP_COLLIDER_DEPTH 3
#define BZ_MAP_COLLIDER_DEPTH 2
typedef struct BzTileLayer {