diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-07 16:14:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-07 16:14:59 +0400 |
commit | 23440884fea7e70a320d9fffd971fb7005b31589 (patch) | |
tree | d354f6358eb816b49a8c9d70496895c1b848826c /source/gameengine | |
parent | 11087d4a827996d4d7bd909ccd49c8b4e359572a (diff) |
fix for casting shadows of scaled objects was made to X_BlenderRenderTools.cpp but not to GPC_RenderTools.cpp.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/GamePlayer/common/GPC_RenderTools.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp index 1ba848a344c..0d851c4f10d 100644 --- a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp +++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp @@ -278,6 +278,12 @@ void GPC_RenderTools::applyTransform(RAS_IRasterizer* rasty,double* oglmatrix,in // 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 { |