From 23440884fea7e70a320d9fffd971fb7005b31589 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 7 Oct 2013 12:14:59 +0000 Subject: [PATCH] fix for casting shadows of scaled objects was made to X_BlenderRenderTools.cpp but not to GPC_RenderTools.cpp. --- source/gameengine/GamePlayer/common/GPC_RenderTools.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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 {