Hello i want to draw real 3D segment when i move in mouse in engine i want that considere my segment is real 3D object and i don’t want that this segment is screen interface
this is my code :
import sys
from direct.showbase.ShowBase import ShowBase
from pandac.PandaModules import *
from direct.directtools.DirectGeometry import LineNodePath
class Application(ShowBase):
def __init__(self):
ShowBase.__init__(self)
ls = LineSegs()
ls.setThickness(10)
# segment
ls.setColor(1.0, 0.0, 0.0, 1.0)
ls.moveTo(0.0, 0.0, 0.0)
ls.drawTo(1.0, 0.0, 0.0)
node = ls.create()
render2d.attachNewNode(node)
Application().run()
how detach segment to screen ?