Position dependant on size (SOLVED)
by Azmodeus · in Torque Game Builder · 10/03/2006 (10:01 pm) · 4 replies
I'm in the level builder.
I'm trying to place things around my world.
However, the position x,y is showing different results based on what size the object is?
Is that normal?
I would think if I place an object at 0,0 for any object reguardless of its size it would position one of its corners at that location. But it doesnt. 0,0 for an object of size 200,200 is vastly offset from a object that is of size 600,600.
Help.
I'm trying to place things around my world.
However, the position x,y is showing different results based on what size the object is?
Is that normal?
I would think if I place an object at 0,0 for any object reguardless of its size it would position one of its corners at that location. But it doesnt. 0,0 for an object of size 200,200 is vastly offset from a object that is of size 600,600.
Help.
#2
Basically, is there a way to maybe edit the c++ (and this is way beyond me, because I havnt even looked at the c++ yet) so that it uses the corner of a sprite instead of the center?
If so, can you point me in the right place to start looking?
10/03/2006 (10:31 pm)
I see. So if I place 2 objects at 100,100 their "centers" will be at 100,100.Basically, is there a way to maybe edit the c++ (and this is way beyond me, because I havnt even looked at the c++ yet) so that it uses the corner of a sprite instead of the center?
If so, can you point me in the right place to start looking?
#3
Havnt found that bit of code yet.
10/03/2006 (11:03 pm)
I *think* all I need to change is the drawing routines so that when it draws a object it draws it based on the offset from the center rather than from the center.Havnt found that bit of code yet.
#4
In 3D word this is more clear because you have 3 axis x,y,z
you have to get use to this "middle" position however you can get the left corner of your object
With the function getAreaMin()
10/14/2006 (12:53 pm)
Because t2d came from tge which is a 3D engine the center of an object is the position of the objectIn 3D word this is more clear because you have 3 axis x,y,z
you have to get use to this "middle" position however you can get the left corner of your object
With the function getAreaMin()
Torque Owner Thomas Buscaglia