However, I'm almost positive this is a bug. Unless, of course, I'm doing something wrong?
I'll try to go into as much detail as I can on this problem.
I've got a light which has casting shadows.
Code: Select all
ILightSceneNode* light1 = smgr->addLightSceneNode(0, core::vector3df(0,0,0),
video::SColorf(server.lightR, server.lightG, server.lightB, server.lightA), 40000.0f);
light1->enableCastShadow( true );Notice CastShadow is set to true.
The player model is not a full player model. It's rather pieces of a player, this way you can find clothing and select it from your inventory (I.E. find a hat on the ground, Press A to put it on! The hat attaches to your player's head bone)
Here is a piece of the code -- This is the same concept for each piece of clothing:
Code: Select all
hatNode = smgr->addAnimatedMeshSceneNode(hatMesh);
hatNode->setMaterialTexture(0, driver->getTexture(imgPath));
hatNode->getMaterial(0).Shininess = 0;
hatNode->addShadowVolumeSceneNode();
hatNode->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
hatNode->setParent(headBone);Can't forget how I'm initializing the device:
Code: Select all
device = createDevice(driverType, core::dimension2d<u32>(640, 480), 16, false, true);http://i.imgur.com/X2aBEVH.png
Strangely, mostly everything seems to work fine! Except for hats. When the player faced the sunlight, the entire shadow begins missing.
When not facing the sunlight, it is there.
However, the hat seems to display the shadow rarely. And mostly is distorted???
Keep in mind, the hat is .obj while everything else is .b3d, But I'm not convinced this is the problem. I've also tried converting the hat to .b3d, which changed nothing at all.
Any ideas on the solution to this problem? Has anyone ever had this happen too? Anything I could include to break down the issue?
Please let me know!
Thanks again!!!
