hi!,
i have a error when attach an object with a ISkinnedMesh in a jointNode.
The white object was attached to the shoulder of the character.
Sampling error for this video:
http://www.youtube.com/watch?v=6hBQP4766Cw
How can I fix this?
this is the code:
....
mesh = (ISkinnedMesh*)game->smgr->getMesh("mesh.x");
node = game->smgr->addAnimatedMeshSceneNode(mesh);
node->setJointMode(E_JOINT_UPDATE_ON_RENDER::EJUOR_CONTROL);
mesh->setInterpolationMode(E_INTERPOLATION_MODE::EIM_CONSTANT);
sl= smgr->addAnimatedMeshSceneNode(game->smgr->getMesh("sl.3ds"));
sl->setParent(node->getJointNode("Bip01_Shoulder"));
......
thanks.
Error with ISkinnedMesh and attach object
seems to be with how you are updating the absolute positions of the bones, seems like you are updating them after drawing each frame, not before.
[url=irc://irc.freenode.net/irrlicht]irrlicht irc[/url] - corrodinggames.com
test
Luke wrote:seems to be with how you are updating the absolute positions of the bones, seems like you are updating them after drawing each frame, not before.
Hello,thanks for you answer!, I call the function animateJoints() before smgr->drawAll() and this improved.
but I still have an error in the end of the video when the character is tilted. The object remains in the same position despite having tilted the character. This is only updated when you call the function SetCurrentFrame but then, after that, go back to look bad, as seen in the video.
I think this happens because the function SetCurrentFrame calls a method beginTransition, which updates the bones positions. But I can not call the function SetCurrentFrame all the time because it damaged the animation
What can I do?
Thank you!