Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / source / gameengine / BlenderRoutines / KX_BlenderRenderTools.cpp
index ffff718..8ed36e8 100644 (file)
@@ -261,6 +261,12 @@ void KX_BlenderRenderTools::applyTransform(RAS_IRasterizer* rasty,double* oglmat
                                // couldn't find something to cast the shadow on...
                                glMultMatrixd(oglmatrix);
                        }
+                       else
+                       { // we found the "ground", but the cast matrix doesn't take
+                         // scaling in consideration, so we must apply the object scale
+                               MT_Vector3  size = gameobj->GetSGNode()->GetLocalScale();
+                               glScalef(size[0], size[1], size[2]);
+                       }
                } else
                {
 
@@ -384,5 +390,4 @@ void KX_BlenderRenderTools::Update2DFilter(vector<STR_String>& propNames, void*
 void KX_BlenderRenderTools::Render2DFilters(RAS_ICanvas* canvas)
 {
        m_filtermanager.RenderFilters(canvas);
-}
-
+}
\ No newline at end of file