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
[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
Torque Owner Anthony Fullmer