Game Development Community

dev|Pro Game Development Curriculum

Shadows for GMK objects and ragdolls

by Hedd Roberts · 02/16/2012 (4:24 am) · 0 comments

I had this problem a while ago! Just put these into ragdoll.cpp at the start of RagDollData::RagDollData() and also in physicsBody.cpp at the start of PhysicsBodyData::PhysicsBodyData()

shadowEnable = true;
shadowCanMove = true;
shadowCanAnimate = true;

genericShadowLevel = 0.4f;
noShadowLevel = 0.01f;

That will give you shadows on physics objects and ragdolls. Because they are derived from shapebase this is all thats needed, and the shadow will render automatically!

Hope this helps!