Hi, I’m very new to Panda3D and I’ve decided to try to use it to create a dungeon crawler type of game. I’m having an issue trying to create lines in the scene. I’ve went through quite a few posts on here to see if this answer was completely answered but I haven’t found one that suits what I am asking. I also checked the documentation but I couldn’t find any examples of LineSegs being used nor what to include for LineSegs to work.
I would like to create a grid that lays over the floor plane (it will be a flat plane so I wouldn’t need to worry about angles) but basically have almost no idea where to start. All I currently have is the initialization of Panda3D and a snippet of code that I found that should work, however, I don’t know what to import for LineSegs to work.
from direct.showbase.ShowBase import ShowBase
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self);
self.segs = LineSegs("lines");
self.segs.setColor(1, 1 ,1 ,1);
self.segs.drawTo(-1, 3, 0);
self.segs.drawTo(1, 2, 1);
self.segsnode = self.segs.create(False);
render.attachNewNode(self.segsnode);
app = MyApp();
app.run();
I know this is literally the starting point of my whole project but I wanted to overcome this hurdle before tackling the easier ones. Any help is really appreciated and thank you in advance.
-Insomnimatic