Game Development Community

3D object to 2D Scene

by Will O-Reagan · in Torque X 2D · 05/04/2008 (9:40 am) · 5 replies

Is there an easy way to put a 3D object into a 2D scene?

About the author

I have a degree in dramatic art, and literature, from UC Santa Barbara. I've worked for a few studios, also at Animax Ent in 2008, and some smaller studios. Currently studying Computer Science at CSU Channel Islands.


#1
05/04/2008 (10:02 am)
Definitely, try something like this:

T2DShape3D shape = new T2DShape3D();
shape.Name = "Player";
 
shape.SetShape(@"data\shapes\boombot\orange_player.dts");
shape.ShapeScale = new Microsoft.Xna.Framework.Vector3(10);
 
shape.Components.AddComponent(new MovementComponent());
shape.Components.AddComponent(new T2DPhysicsComponent());
 
TorqueObjectDatabase.Instance.Register(shape);

John K.
#2
05/04/2008 (2:02 pm)
That worked great.. I cant wait for your book!
#3
05/06/2008 (4:23 pm)
Cool. I was wondering this myself this morning. Wish we could load them in TXB like you can in TGB.
#4
05/06/2008 (6:07 pm)
Agreed. I really like that TXB feature.

John K.
#5
09/10/2010 (2:00 am)
Could I put in say boxes in this manner and possibly move them around in the editor or would there be a different way of doing something like that? Having 3d object in scene would be great but I dont really need a 3d player so thats why I ask. Also since I am completely new to code in general where would I put this code at? Sorry for all the questions but love the idea of 3d objects in a 2d scene like FlatRedBall has.