Game Development Community

Exporting StaticMeshs from constructor to torque

by UZON · in Torque Game Engine · 02/07/2008 (3:35 pm) · 0 replies

My 3D crew put all the objects (DTS) of my cenario in the position as Static Meshs inside the constructor. It is like 800 objects, so i need a easy way to export them Torque to use as TSShape.

I already made an script in PHP to take this:

<SceneShape id="12" type="2" file="Hterreo/refeitorio/mesas_refeitorio.dts" pos="-0.712652 -59.9478 -0.870075" rot="0 0 -1 4.71239" scale="1.5 1.5 1.5" transform="8.9407e-008 1.5 0 -0.712652 -1.5 8.9407e-008 0 -59.9478 0 0 1.5 -0.870075 0 0 0 1" group="-1" locked="0" />

from the stage.csx and converted into this:

new TSStatic() {
canSaveDynamicFields = "1";
position = "-0.712652 -59.9478 -0.870075";
scale = "1.5 1.5 1.5";
rotation = "0 0 -1 4.71239";
shapeName = "~/data/staticshapes/Hterreo/refeitorio/mesas_refeitorio.dts";
receiveSunLight = "1";
receiveLMLighting = "1";
useAdaptiveSelfIllumination = "0";
useCustomAmbientLighting = "0";
customAmbientSelfIllumination = "0";
customAmbientLighting = "0 0 0 1";
useLightingOcclusion = "1";
};

But the rotation of the constructor, dont match the rotation in Torque, this is what is holding me back. any idea of how i can make this conversion, or how it work?