Volker wrote:
As mentioned in the getNodeChild docs "This function looks for the n-th (index) child node of a specified node and returns its handle. If the child doesn’t exist, the function returns 0". So if _test is always null, the _man Node does not have 15 childs. Indead it has only two childs. One root joint called "Hips" and one mesh node called "body". You can investigate that yourself if you look into the "man.scene.xml" file.
To access a specific joint you might better use
findNodes and
getNodeFindResult first, then store the returned scene graph index and use that index for setNodeTransform.
I guess your use of
_man when calling setNodeTransform while trying to store the joint index in the variable
_test was only a typo
Yes, that _man /_ test whas a typo.
I thought that the children of the man's children are still the man's children (whoaa!). I mean, man has a child node called "Hips" (jointIndex=1) and this node has it's own child called "RightUpLeg" (jointIndex=2). So i thought this leg is still the man's child. So you say the man cannot be a granpa?
I tried the following:
_test = Horde3D::getNodeFindResult (Horde3D::findNodes (_man, "Head", SceneNodeTypes::Undefined));
Then after re-readind for the 4th time:
_test = Horde3D::getNodeFindResult (Horde3D::findNodes (_man, "Head", SceneNodeTypes::Undefined) - 1 );
and it finally worked.
Thanks, you helped me a lot!