Game Development Community

Tutorial error?

by Vern Jensen · in Torque Game Builder · 06/19/2006 (10:34 pm) · 1 replies

I ran across this tutorial by doing a search:

[link]http://tdn.garagegames.com/wiki/Torque_2D/GenreTutorials/PlatformerCamera[/link]

It has the following in one of the code sections:

[code]%area = sceneWindow2D.getcurrentCameraArea();
%x = getWord(%area, 0);
%y = getWord(%area, 1);
%width = getWord(%area, 2);
%height = getWord(%area, 3);[/code.

However, i find that getWord(%area, 2) and getWord(%area, 3) return the RIGHT and BOTTOM sides of the rectangle, while the x and y are really the LEFT and TOP sides. At least, that's what it seems when I echo the results to the console and compare them with my scene graph's dimensions.

-Vern

#1
06/19/2006 (11:22 pm)
Well, I wouldnt trust the platformer tutorial anyways, it was written for a much earlier version of the codebase and doesnt necessarily reflect the current state of the code... as far as i know it hasnt been updated for the new versions of the engine