What is easiest way to draw lines and cubes from script?
by Blake Drolson · in Torque Game Engine · 07/08/2008 (1:21 am) · 3 replies
Hi there,
I am trying to do some simple gameplay debugging of object locations etc, and would like to draw some lines and cubes in different colors to check (and debug :) ) my geometry calcs.
What is the easiest way to draw lines and cubes? I looked and I am surprised I can't find any drawing primitives at the script level. Do I need to create an object to wrap up the dglDraw**** code? Would calls to draw lines this way persist or would they need to be called every drawframe?
Is there an easier method than exposing the dgl draws routines? Something already exist?
Thanks in advance for any help.
I am trying to do some simple gameplay debugging of object locations etc, and would like to draw some lines and cubes in different colors to check (and debug :) ) my geometry calcs.
What is the easiest way to draw lines and cubes? I looked and I am surprised I can't find any drawing primitives at the script level. Do I need to create an object to wrap up the dglDraw**** code? Would calls to draw lines this way persist or would they need to be called every drawframe?
Is there an easier method than exposing the dgl draws routines? Something already exist?
Thanks in advance for any help.
#2
07/08/2008 (11:41 am)
Thanks for the tip about the debugDraw class, but I cant find it in the C++ code (did global search for debugdraw) and I dont see anyone talking about it in TGE (I am using 1.52 code). Can you point me to it, and is there any info on its use or another forum thread to point me to?
#3
07/08/2008 (11:49 am)
Its in gfx/debugDraw.h in my version of TGEA. It might not be in TGE 1.52 ... who knows ... Its not a very big class though, but its the only way to manually draw something like a line or cube from script that I am aware of.
Associate James Ford
Sickhead Games