Hello,
I have a strange bug...
The hero shadow is very far from him...
Here is a part of my code :
// add animated character
m_iMeshPlayer88 = mgr->getMesh("assets/characters/man/guy.x");
m_playerNode2 = mgr->addAnimatedMeshSceneNode(m_iMeshPlayer88, m_playerNode, NULL);
/*m_playerNode2->setPosition(core::vector3df(0.0f,-11.0f,-2.0f));
m_playerNode2->setScale(core::vector3df(0.3f,0.3f,0.3f));
m_playerNode2->setRotation(core::vector3df(0,180.0f,0));*/
m_playerNode2->setPosition(core::vector3df(0.0f,-10.0f,0.0f)); // Y is vertical hauteur, Z is near or far
m_playerNode2->setScale(core::vector3df(5.0f,5.0f,5.0f));
m_playerNode2->setRotation(core::vector3df(0.0f,90.0f,90.0f));
m_playerNode2->setFrameLoop(6,66); // idle pose
m_playerNode2->setAnimationSpeed(40);
m_playerNode2->setLoopMode(false);
m_playerNode2->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
// add shadow
m_playerNode2->addShadowVolumeSceneNode();
mgr->setShadowColor(video::SColor(150,0,0,0));
Please help
Thanks
Eviral
addShadowVolumeSceneNode and shadow very far from mesh
Unrelated but, thats a very nice looking project. Are you using normalmapping on that model in the background?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net