I've got a MD2 running around on a spacestation static mesh.
1) No shadow
Code: Select all
AnimatedMesh pr= scene.GetMesh("data\\man.md2");
player = scene.AddAnimatedMeshSceneNode(pr);
player.Scale = new Vector3D(0.15f,0.15f,0.15f);
player.Position = new Vector3D(0, 11, 0);
player.SetMaterialTexture(0,driver.GetTexture("data\\droideka.bmp"));
player.SetFrameLoop(1, 39);
player.AnimationSpeed = 50;
player.AddShadowVolumeSceneNode(-1, true, 10000f);
player.SetMaterialFlag(MaterialFlag.NormalizeNormals, true);
Then it wouldn't appear as the static mesh is above it.
2) Lighting wrong on md2 object
I have a single point light off to the side, this lights the scene correctly but the MD2 is lit as if it was lit before it was rotated, ie. the right shoulder is always bright even when the object is rotated away from the light