T2dShape3d for TGE?
by Christopher Evans · in Torque Game Engine · 12/16/2008 (1:03 pm) · 3 replies
Before I start digging into engine code I would like to know if there is a t2dShape3d like control for TGE. For those who do not know what t2dShape3d is, its a TGB gui control that lets you place a 3D in the game and it is treated like a normal 2d object.
Basically I want to be able to take a dts object, and place it on the user HUD. Does anyone know if this exist already or do I need to create this myself?
Thanks
Basically I want to be able to take a dts object, and place it on the user HUD. Does anyone know if this exist already or do I need to create this myself?
Thanks
#2
12/16/2008 (1:40 pm)
Just to clarify, a t2dShape3d is not a GUI object.
#3
I am using TGE 1.5.2
Create a default GuiPlayerView and name it PlayerView
Here is a snippet of my code
NOTES
1: I had issue when I set the file path to "~/data/shapes/player/player.dts". The model didn't load, I think the code expects a full path.
2: The code gives the model a random rotation in GuiPlayerView.cc around line 151, I commented this out because it annoyed me
I think I will rewrite this code so it allows for animation and more flexibilities in the datablock, but that wont be for a month or so. If anyone know of a custom version that already does this let me know it would save me some time. :)
12/16/2008 (2:14 pm)
Thank you guys for your help. I been able to get it to work. It seems like this control could use a little upgrading. And I had some issues getting it to work. Here is some notes for anyone else needing something like this.I am using TGE 1.5.2
Create a default GuiPlayerView and name it PlayerView
Here is a snippet of my code
function loadView()
{
%model = "tutorial.base/data/shapes/player/player.dts";
PlayerView.setModel(%model, "");
}NOTES
1: I had issue when I set the file path to "~/data/shapes/player/player.dts". The model didn't load, I think the code expects a full path.
2: The code gives the model a random rotation in GuiPlayerView.cc around line 151, I commented this out because it annoyed me
I think I will rewrite this code so it allows for animation and more flexibilities in the datablock, but that wont be for a month or so. If anyone know of a custom version that already does this let me know it would save me some time. :)
Torque 3D Owner Dave Young
Dave Young Games