This seems stupid but...
by Isaac Barbosa · in Torque Game Builder · 10/04/2006 (6:02 pm) · 4 replies
Hi:
I was using Flash before start Torque. I'm still amazed!
But there is something that is really confusing and that I can't understand or find info...
How the coordinates system works in Torque???
I mean, where is the point X,Y = 0. And how I can establish the negative and positive values both for X and Y?
That's all, pretty basic -I feel stupid- but can't find info.
Thanks
I was using Flash before start Torque. I'm still amazed!
But there is something that is really confusing and that I can't understand or find info...
How the coordinates system works in Torque???
I mean, where is the point X,Y = 0. And how I can establish the negative and positive values both for X and Y?
That's all, pretty basic -I feel stupid- but can't find info.
Thanks
#2
-10, 0 would be left
10, 0 would be right
0, -10 would be up
0, 10 would be down
%this.setWorldLimit( kill, "-80.000 -300.000 440.000 60" );
This statement means that the upper-left most world limit is (-80.000, -300.000) and the bottom-right most world limit is (440.000, 60).
10/04/2006 (6:56 pm)
0, 0 is the center of the world. Negative on the X axis is the left, positive on the X axis is to the right. Negative on the Y axis is up, positive on the Y axis is down. Therefore:-10, 0 would be left
10, 0 would be right
0, -10 would be up
0, 10 would be down
%this.setWorldLimit( kill, "-80.000 -300.000 440.000 60" );
This statement means that the upper-left most world limit is (-80.000, -300.000) and the bottom-right most world limit is (440.000, 60).
#3
(0, 0) is not the center of the world. It is the default center of the camera. You can make the camera have its top left be at (0, 0) instead, if that is what you wish. You define the coordinate system by where you place the camera and the extents you give it. If you place the camera so its top left is at (0, 0) and the camera is 1024x768 then your coordinate system is viewable from x = [0, 1024) and y = [0, 768) though you are free to place objects outside the viewable camera area. You could center your camera at (1000000, 1000000) and have its extents be 20x10 if you wanted ;) Increasing Y always points "down" on the screen and increasing X always points "right" on the screen. Hope that clears a few things up.
10/04/2006 (9:48 pm)
A clarification or two...(0, 0) is not the center of the world. It is the default center of the camera. You can make the camera have its top left be at (0, 0) instead, if that is what you wish. You define the coordinate system by where you place the camera and the extents you give it. If you place the camera so its top left is at (0, 0) and the camera is 1024x768 then your coordinate system is viewable from x = [0, 1024) and y = [0, 768) though you are free to place objects outside the viewable camera area. You could center your camera at (1000000, 1000000) and have its extents be 20x10 if you wanted ;) Increasing Y always points "down" on the screen and increasing X always points "right" on the screen. Hope that clears a few things up.
#4
I was using another criteria. Now the point is clear: I was thinking in four points for the world limit, instead of just left top corner and right bottom corner.
That way everything is so easy :)
10/05/2006 (8:07 am)
Thanks to both!I was using another criteria. Now the point is clear: I was thinking in four points for the world limit, instead of just left top corner and right bottom corner.
That way everything is so easy :)
Torque Owner Isaac Barbosa
IQ Games
If I have this statement...
how can I have it to understanding purposes as:
%this.setWorldLimit( kill, "X, -X, Y, -Y" );?