Game Development Community

dynamic add dif to the mission but could not relight the dif model

by FanZhang · in Torque Game Engine Advanced · 08/06/2009 (4:45 am) · 1 replies

Hi,Now I have a mission file that do not include one dif model which i want to add it in runtime.Like this:
MissionGroup.add(
new InteriorInstance() {
canSaveDynamicFields = "1";
Enabled = "1";
position = "-49.9461 -356.36 113.478";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "scriptsAndAssets/data/interiors/building2/building.dif";
showTerrainInside = "0";
smoothLighting = "0";
}
);
OK,it could add the dif model into the scene well except that could not relight the dif model.It is still dark.I have tried the lightScene("", forceAlways);,but that could not work to the dif model and while I use the lightEditor to relight the scene that could work well.I have Debug the code but i can not find anything about how to relight the new added dif model.
How do i have to do to solute this problem.
Thanks a lot:)

#1
08/06/2009 (6:12 pm)
OK>The problem has been soluted like this:
MissionGroup.add(
new InteriorInstance() {
canSaveDynamicFields = "1";
Enabled = "1";
position = "-49.9461 -356.36 113.478";
rotation = "1 0 0 0";
scale = "1 1 1";
interiorFile = "scriptsAndAssets/data/interiors/building2/building.dif";
showTerrainInside = "0";
smoothLighting = "0";
}
);
schedule(10000,0,lightScene,"",forceAlways);