< 6; i++) {
                const start = vertices[i];
                const end = vertices[(i + 1) % 6];
                
                const distance = distanceToSegment(
                    {x: ball.x, y: ball.y},
                    start,
                    end
                );
                
                if (distance <= ball.radius) {
                    // Calculate normal vector to the wall
                    const wallVec = {x: end.x - start.x, y: end.y - start.y};
                    co