Game Development Community

Drawing lines in torque 2D

by Brian Wilmeth · in Torque Game Builder · 02/08/2006 (4:36 am) · 3 replies

I have what I think is a simple question. I know how to put tiles and such into torque, but what if I want to simply draw a line. For example I want to connect two objects by a line, but the objects might be far away or very close. The line will change depending on where the objects are. How can I do this and/or where can I learn about this?

Brian

#1
02/08/2006 (5:07 am)
If you are using the latest alpha 3 or beta 1 you can use the t2dShapeVector object.
Basically you can use it to draw graphic primitives like lines and polygons.
I don't remember how to use it, but if you search the forums you should find some examples.
At the moment it's a feature that is missing from the docs (reference and tutorials).

Bye,
Jacopo
#2
02/09/2006 (9:17 am)
I'm not sure you can use the stock poly tool to do what you are wanting though. Sure, you can draw a line, but as much as I've figured out, you can't give 2 points and ask for a line to be drawn in between.
#3
02/21/2006 (12:13 pm)
Here is a thread with everything you need to draw a line.

Hope it helps
G