Game Development Community

3d model in 2d game

by Chris Moss · in Torque X 2D · 01/07/2009 (6:34 pm) · 1 replies

I'm trying to get a 3d model in a 2d game using this bit of code

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);
}

however, I get an error saying there is no .dts importer which handles this file type.

Can someone help me out please. Is there any documentation at all regarding T2DShape3D?

#1
01/08/2009 (12:12 am)
You have to set the Build Action to Content.