Prof. Yelon, it seems that your new make_consistent_state doesn’t consider this case :
def createIntersectionMarker():
# create intersection marker
length=.16
offset=.015
color=(0,0,0,0)
cornerColor=(0,0,0,1)
intersectionMarker = aspect2d.attachNewNode('')
axis=intersectionMarker.attachNewNode('')
axisGeomDum=axis.attachNewNode('')
axisGeomDum.attachNewNode( createLshape(
length,color,cornerColor,thickness=4)).setPos(offset,0,offset)
#__________
length+=.02
color=(.5,.5,.5,0)
cornerColor=(1,0,0,1)
axisGeomDum=axis.attachNewNode('')
axisGeomDum.attachNewNode( createLshape(
length,color,cornerColor,thickness=2)).setPos(offset,0,offset)
############################################################################
intersectionMarker.flattenLight()# <-------------------- CRAZYNESS
############################################################################
intersectionMarker.setTransparency(1)
def createLshape(length=1, color=(0,0,0,1), cornerColor=None, thickness=1):
LS=LineSegs()
LS.setColor(*color)
LS.setThickness(thickness)
LS.moveTo(0,0,length)
LS.drawTo(0,0,0)
LS.drawTo(length,0,0)
node=LS.create()
if cornerColor:
LS.setVertexColor(1,*cornerColor)
return node
createIntersectionMarker()