Game Development Community

X=0 and Y=0 in center of Screen

by Cezar Augusto Ximenes Wagenheimer Lima · in Torque Game Builder · 08/26/2009 (1:19 pm) · 3 replies

Why X=0 and Y=0 is on center of Screen, instead of the 0,0 real Position?

Is it possible to Change this behavior?

About the author

Game Developer! Creator of Druids Battle of Magic and Abra Academy Series games.


#1
08/26/2009 (4:21 pm)
Sure. Change your camera position. Click on the Project tab, then on your SceneGraph, then on the Edit tab, and change the camera X and Y location.

You can also change it in code.

sceneWindow2D.setCurrentCameraPosition(...)

although your sceneWindow may be named differently in your GUI.
#2
08/26/2009 (10:52 pm)
Hi Vern!

Thanks for the Answer, but I think that I didn't expressed myself well...

Please, take a look on this screenshot!

www.wagenheimer.com/Screenshot.jpg
There are two objects, and both are at the same position (X=0 and Y=0).

Why did this happens?

In my opinion, both objects (when both are x=0 and y=0) must be positioned like this:

www.wagenheimer.com/Screenshot2.jpg
They must start at the same position. Is this possible? Changing the Camera does not seems to change nothing on this.


#3
09/14/2009 (4:10 pm)
Image objects have their positions set from the center of the object not the top left corner.