Game Development Community

Documentation...

by Melv May · in Torque Game Builder · 01/22/2006 (8:44 am) · 7 replies

I would just like to mention that due to a minor oversight, some of the documentation wasn't synchronised correctly to the latest features. Please note that this doesn't affect the code at all, just that some last minute changes to the documentation didn't get copied across.

Also, the change-log didn't get updated so it has missed several changes.

None of this should affect anyone as the changes are fairly minor. Please note that I cannot host the new files anywhere and there'd be no point as these updates should be coming regularly anyway. :)

- Melv.

#1
01/22/2006 (9:39 am)
Still - where would I go to find script calls for the new vector functionality?
#2
01/22/2006 (11:51 am)
There is no documentation for that yet but then there's lots of other documentation to finish I guess. Besides, this is a very simple object and you can easily see the several calls available in the code. I'm not sure that's a hardship. :)

Just to let you know, this object isn't the beginnings of vector support in T2D, this is simply an object that can draw vectors; vector support is to be a much more broader scope of work.

- Melv.
#3
01/23/2006 (8:12 pm)
Quote:
Besides, this is a very simple object and you can easily see the several calls available in the code. I'm not sure that's a hardship. :)
Well that's what I meant - I've never looked at the source code really - been content with TS so far. I do know C++ but I was hoping to save myself the digging. Pardon my laziness - it's a bad habit of mine ;) I'll look for it sometime - it's not really important to me right now anyways thanks
#4
01/26/2006 (1:59 pm)
It's actually quite easy to use.

$shape = new t2dShapeVector() { scenegraph = theSceneGraph; };
$shape.setPolyScale( "1 1" );
$shape.setPolyPrimitive( 3 );
$shape.setAutoRotation( 180 );
$shape.tag = "poly_test";
$shape.mount( $someObject, "0 0", 0, false );

Will create a triangle (setPolyPrimitive(3)) that is mounted to some object and auto rotates around it.
#5
01/28/2006 (7:16 pm)
I cant get this to work... I'm using:

$shape = new t2dShapeVector() { scenegraph = theSceneGraph; };
	$shape.setPolyScale( "1 1" );
	$shape.setPolyPrimitive( 3 );
	$shape.setPosition("20 20");

I've tried several variations, bu it still doesn't do anything. Does it have to be mounted or somethign ? I just want to draw in free space.
#6
01/28/2006 (9:50 pm)
Try changing

scenegraph = theSceneGraph;

to

scenegraph = t2dScene;

That's the default name for it I believe. However i'm not sure if you've changed it or anything.

As another reference this is what i'm using to make rectangles.

%match = new t2dShapeVector() { scenegraph = t2dScene; };
	%match.setPolyCustom(4, "1 0.3 -1 0.3 -1 -0.3 1 -0.3");
	%match.setFillMode(true);
	%match.setFillColor("0 0.5 0");
	%match.setLineColor("0 1 0");
	%match.setSize(24);
	%match.setPosition("0 -5");
#7
01/29/2006 (4:06 am)
David - Thankyou. When I posted this I had been coding for almost 16 hours straight and I guess I was getting tired. I can't believe I missed that.

And thankyou for the rectangle code, a rectangle was actually what I was trying to make.