Game Development Community

3D Objects?

by VcDeveloper · in Torque X 2D · 12/10/2008 (2:30 pm) · 8 replies

I notice there is no 3D Scroll Section for 3D objects. So assuming correctly TXB doesn't support this correct? If it does, how do I add a 3D object to the scene?

#1
12/10/2008 (2:43 pm)
You will need to add it via code. TXB 2D does not support 3D assets.
#2
12/10/2008 (3:52 pm)
Actually you can place 3D assets by code, but not by use of the 2D Builder.

public void CreatePlayer()
{
T2DShape3D shape = new T2DShape3D();
shape.Name = "Player";
shape.SetShape(@"data\shapes\orange_player.dts");
shape.ShapeScale = new Microsoft.Xna.Framework.Vector3(10);
shape.Components.AddComponent(new MovementComponent());
shape.Components.AddComponent(new T2DPhysicsComponent());

//rotate the model to face camera
shape.Rotation2 = new Vector3(0, 90, 15);

TorqueObjectDatabase.Instance.Register(shape);
}

Jeff
#3
12/10/2008 (6:28 pm)
Thanks D! and Thanks J for showing me the "how to"!...
#4
12/15/2008 (2:49 am)
Good question.
TX didn't support 3D when TBX first came out but now it is.
It seems pretty simple enough to add it in the Builder.
I'm wondering if the new version v3 which is imminant will support 3D objects or if there there is any new features in TBX.
Thanks.
#5
12/15/2008 (3:31 pm)
No, the new TXB2D will not have built-in support for 3D shapes. The only way to add them will be the code example from Jeff.

John K.
#6
12/15/2008 (7:50 pm)
Then what's new in the new TBX??
#7
12/15/2008 (8:45 pm)
There is a 3D builder and a 2D builder now. The 3D builder is the culmination of many, many man hours by John K (who posted the answer to your previous question). It is a very complex tool that took a lot of dev time to make. There were a couple of open beta phases a while back for it. It is currently in QA now with TX 3.0.
#8
12/15/2008 (11:30 pm)
Ahhhh! Chris, there is a 2D Builder and a 3D Builder... The 2D Builder creates 2D scenes (and that's been available for well over a year). The new 3D Builder is coming out with Torque X 3 and creates 3D scenes (such as the FPS Demo).

I might have misread your question (sorry). I was indicating that when Torque X 3.0 is released, the 2D Builder will still not have the ability to add 3D shapes (as in the T2DShape3D objects) into a 2D scene. My comment was based on the fact that TGB has a similar function that will not appear in TXB2D. Sorry for the confusion. You can definitely use the new TXB3D to create 3D scenes.

John K.