I have a little drawing game I am working on. I was just putting together a small line drawing system when I realized its probably not going to stay on the screen after being drawn. So i finish the code and sure enough it vanishes as soon as its made. So currently I have no idea how I am going to draw many of these based on user feedback. Any ideas on how to keep the line and draw more with one script?
Here is a video of the issue: https://youtu.be/MlLmYOZ45Hg
Here is the code:
import bge
own = bge.logic.getCurrentController().owner
#a slot
yax = float(own[‘y’])
xax = float(own[‘x’])
zax = float(own[‘z’])
#b slot
yax2 = float(own[‘y2’])
xax2 = float(own[‘x2’])
zax2 = float(own[‘z2’])
fromVec = [xax,yax,zax]
toVec = [xax2,yax2,zax2]
color = [0,0,0]
bge.render.drawLine(fromVec, toVec, color)