diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2009-06-18 01:18:32 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2009-06-18 01:18:32 +0400 |
commit | b033f07306bea5d210ac23544378de667f2f1324 (patch) | |
tree | f71dbae3fafdd6c71fb453fcfb83299a888e1f26 /source | |
parent | f1b9e76e43d5f0dd58d46cdf529e82b4647c5afa (diff) |
Fix for bug: [#18619] Shadow face flag ignores object's scale
In time for the 2.49a ahoy :)
Diffstat (limited to 'source')
-rw-r--r-- | source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp index ffff7185fe4..8ed36e860b4 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp @@ -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 |