Game Development Community

3d objects

by Aditya Kulkarni · in Torque Game Builder · 06/14/2010 (2:24 am) · 2 replies

for 3d objects, setShapeAngularVelocity(x/y/z)

But isn't this a 2d engine? How then does the Z axis figure in this?

#1
06/14/2010 (4:13 am)
The underlying engine is a 3D engine. TGB is a 2D engine based upon it. Even a 2D engine can render anything it likes when it comes to rendering an object and in this case, it's rendering a 3D shape.

Notice that the command you mention is angular-velocity (rotation), not linear-velocity (translation). You cannot move the 3D shape in the Z-Axis. All "depth" is based upon layers so the 3D rendered shape exists at X,Y,Layer.

In reality, there is not depth, nor is there any depth-checking. You can place two 3D shapes overlapping each other, one in a layer "behind" the other and they will never interact during rendering e.g. they'll never intersect.

Hope this helps.
#2
06/14/2010 (5:13 am)
Got it. So even in setShapeOffset(x/y/z), z means the 'inner' or 'outer' layer.

Thanks Melv.