Instatiating dif
by AlexanderSLG · in Torque Game Engine · 06/12/2007 (11:39 am) · 2 replies
We made a modification to the engine because we needed cliffs to be part of the terrain, and needed to add them in the mission editor. We created cliff DTS models and we extended the tsStatic class to create and manipulate them.
This is all nice, but the DTS doesn't blend all that nicely to the terrain with all lighting settings, so we're looking for solutions. One of them is to change it to a .dif instead of a DTS, but we are not sure how to fix what we're doing for the ts to work for the dif..
we do something like this:
so what should we change the public TSStatic to? Interior? Or am I missing something? Interiors do not seem to be console objects, and this looks like it's going to make the migration a lot of work
thanks
This is all nice, but the DTS doesn't blend all that nicely to the terrain with all lighting settings, so we're looking for solutions. One of them is to change it to a .dif instead of a DTS, but we are not sure how to fix what we're doing for the ts to work for the dif..
we do something like this:
class TSCliff : public TSStatic
{
typedef TSStatic Parent;
protected:
bool onAdd();
*****etc****
}
TSCliff * pO = new TSCliff(m);
bool
ret = pO->setField("shapeName", modelname);
/* set up a lot of variables, like rotation, position and the such */
******
if (!pO->registerObject(name))
{
Con::errorf("addTSCliff: could not register addTSCliff");
delete pO;
return ;
}
/* create group if needed and add the object to it */
******so what should we change the public TSStatic to? Interior? Or am I missing something? Interiors do not seem to be console objects, and this looks like it's going to make the migration a lot of work
thanks
About the author
#2
06/12/2007 (11:40 am)
Yeay for self answering. we still can't figure out the incorrect glName for texture error, but we've worked out the "doesn't light properly" part. It can't be a ghosted object... but then, we NEED IT to be a ghosted object. Does anyone know why don't ghosted (client object) interiors get relighted?
Torque Owner AlexanderSLG
Has anyone ever subclasified Interior? any tips?