First-chance exception at 0x100dfbe8 in 3rdPersonCam.exe: 0xC0000005: Access violation reading location 0xababaca3.
Unhandled exception at 0x100dfbe8 in 3rdPersonCam.exe: 0xC0000005: Access violation reading location 0xababaca3.
The code I am using to load the .x animation is this:
Code: Select all
scene::IAnimatedMesh* mesh = smgr->getMesh("C:/Users/Tims/Desktop/New folder/timwalk2.x");
scene::IAnimatedMeshSceneNode* node1 = smgr->addAnimatedMeshSceneNode(mesh);
if (node1)
{
node1->setMaterialFlag(video::EMF_LIGHTING, false);
node1->setPosition(core::vector3df(0,30,0));
node1->setRotation(core::vector3df(0,0,0));
node1->setScale(core::vector3df(0.75,0.75,0.75));
node1->setAnimationSpeed(2000.f);
}
EDIT: Also tried using multires modifier to lower to polycount on the model to see if that was an issue, but it makes no difference to the error.
Any suggestions on what could be going wrong would be appreciated. Can post my full code up if needs be.
Cheers.