0

I want to draw hexagon without filling, however it seems that setting thickness to more than one produces breaks between the lines. Does anyone know how to fix this?

Code:

from ursina import *

OUTER_RADIUS = 1
INNER_RADIUS = OUTER_RADIUS * 0.866025404

HEX_CORNERS = [
        Vec3(0, 0, OUTER_RADIUS),
        Vec3(INNER_RADIUS, 0, 0.5 * OUTER_RADIUS),
        Vec3(INNER_RADIUS, 0, -0.5 * OUTER_RADIUS),
        Vec3(0, 0, -OUTER_RADIUS),
        Vec3(-INNER_RADIUS, 0, -0.5 * OUTER_RADIUS),
        Vec3(-INNER_RADIUS, 0, 0.5 * OUTER_RADIUS),
        Vec3(0, 0, OUTER_RADIUS)
       ]

hex = Mesh(
    vertices=(
       HEX_CORNERS[0],
       HEX_CORNERS[1], 
       HEX_CORNERS[2], 
       HEX_CORNERS[3], 
       HEX_CORNERS[4], 
       HEX_CORNERS[5], 
       HEX_CORNERS[6]
    ),
    triangles=[[0,1],[1,2],[2,3],[3,4], [4,5], [5,0]],
    thickness=10,
    mode='line'
)

Entity(
    model=hex,
    color=color.black
)

EditorCamera()

app.run()

0 Answers0