Trying to attach something to a b3d joint

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
NoodlePowa
Posts: 32
Joined: Sun Jul 15, 2007 1:02 pm
Location: California

Trying to attach something to a b3d joint

Post by NoodlePowa »

When I try:

Code: Select all

hand->addChild(cube);
It errors me...

Here's what I have:

Code: Select all

IAnimatedMesh* arm = smgr->getMesh("arm.b3d");
IAnimatedMeshSceneNode* arm00 = smgr->addAnimatedMeshSceneNode(arm);
arm00->setPosition(camera->getPosition());
arm00->setScale(vector3df(20, 20, 20));

ISceneNode* cube = smgr->addCubeSceneNode(50);

ISceneNode* arm00_hand = arm00->getB3DJointNode("Hand");
arm00_hand->addChild(cube);

I have a model of a hand with an armature. The armature contains a bone named "Hand" (With a capital 'H').


It errors at the line:

Code: Select all

arm00_hand->addchild(cube);
"Be not ashamed of mistakes and thus make them crimes."
-Confucius
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

Well, that seems like arm00_hand is invalid, i.e. the joint was not found (or "not a b3d file).

Check the joint name is correct?

You could also using IAnimatedMeshB3d getJointCount() and getJointName(s32) to print out a list of available joints.
Post Reply