Game Development Community

TGEA 1.03 Strafing Player Jittery Shadows

by Ronald J Nelson · in Torque Game Engine Advanced · 04/10/2008 (8:28 pm) · 1 replies

This was at first something I though I had done wrong but then I tested it in the stock TGEA 1.03 starter.fps. When you look at your shadow while strafing, the shadow jitters and actually becomes two shadows. Has this already been solved?

This is just one of the little tweaks I wanted to get solved before stopping coding and moving on to helping my team with 3D work.

#1
04/12/2008 (7:23 pm)
Well I fixed this in 1.03 by just replacing the code with what works in 1.7.

Just replace MatrixF sgShadowProjector::sgGetAdjustedParentWorldTransform() with this:

MatrixF sgShadowProjector::sgGetAdjustedParentWorldTransform()
{
   MatrixF mat = sgParentObject->getRenderTransform();
   Box3F box = sgParentObject->getRenderWorldBox();
   Point3F center;
   box.getCenter(&center);
   mat.setPosition(center);

   return mat;
}