How do you rotate the sky box?
by PGames · in Torque 3D Professional · 03/11/2010 (10:58 pm) · 1 replies
Or is that possible? I have been trying to tweak it in in skyBox.cpp, but it turns to black whenever I try to put in rotation code. Here's my code:
mat.set( EulerF( 0.0, 0.0, mRotatingAng ) );
mRotatingAng += 0.5f;
if (mRotatingAng > TWOPI)
{
mRotatingAng = 0;
}
mat.setColumn(3,pos);
sgData.objTrans = mat;
mMatrixSet->restoreSceneViewProjection();
mMatrixSet->setWorld( mat );
mat.set( EulerF( 0.0, 0.0, mRotatingAng ) );
mRotatingAng += 0.5f;
if (mRotatingAng > TWOPI)
{
mRotatingAng = 0;
}
mat.setColumn(3,pos);
sgData.objTrans = mat;
mMatrixSet->restoreSceneViewProjection();
mMatrixSet->setWorld( mat );
Torque Owner Ken Johnston
Indiestructable Systems
edit, depending on what you mean you could also scroll the texture as well instead of rotating the skybox object