Game Development Community

Visualize Vectors

by Tom \"epicglottis\" MacGregor · in Torque Game Engine · 01/31/2007 (3:42 pm) · 2 replies

The teacher of my class wants us to play around with vectors using TGE. He would like us to be able to visualize the vectors we are creating in game.

How would one display in-game the vectors (and the result of combining vectors)?

Rendered lines from below is what we're looking for:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10991

Any help or points to something similar would be great.

#1
02/07/2007 (7:18 pm)
Talking out of my ass, here, but my hack would be to create some small static objects of different colors, instantiate them at one end of your line, and scale them to the other end of the line.

Sounds like a fun project!
#2
02/07/2007 (10:08 pm)
You are going to need to use OpenGL calls for this, as Torque doesn't have any way of rendering pure render lines as objects.

You could look at some of the debug rendering stuff for drawing WireCube (SceneObject I think has this method) and use a similar technique.