B@z wrote:wait but it works with animatedmeshscene node isnt it!?
for example, you add animated mesh with
ISceneManager->addAnimatedMeshSceneNode, then store that in an ISceneNode.
later that you cast it to IAnimatedMeshSceneNode, and for example get its joints (ISceneNode doesnt have joints), then it returns the true value
Code: Select all
ISceneNode* node = smgr->addAnimatedMeshSceneNode(smgr->getMesh("blahblah.b3d"));
vector3df bonePos = ((IAnimatedMeshSceneNode*)node)->getJointNode(1)->getPosition();
this one should work (didnt try it now, but using one like this)
sorry if i misunderstood the problem xD
that's right, because IAnimatedMeshSceneNode is inherited from ISceneNode...
but it won't work the other way:
if you create an ISceneNode (addSceneNode) you can't cast it later to an IAnimatedMeshSceneNode !!!
well, in fact you can, the compiler will allow this, but it won't work, because the created ISceneNode doesn't know about methodes that the IAnimatedMeshSceneNode has, because ISceneNode is not inherited from IAnimatedMeshSceneNode...
EDIT: it's a bit like with programs, eg:
you have a program that saves and loads something...
now you get a newer version of this program...
the new version usually can read the datas the old version wrote...
but because there are new features to the new version, the old version can't read the contents of the new version...
you could say the new version is inherited from the old version, but the old version (of course) not from the new version, so it can't know what new features the new version has...